いきなり brew install imagemagick だと
displayコマンドで、
display: delegate library support not built-in `' (X11) @ error/display.c/DisplayImageCommand/1909.
となる。そこで、
brew uninstall imagemagick したあと次のものを入れた。
(1) XQuartz
http://support.apple.com/kb/HT5293 About X11 and OS X Mountain Lion
http://xquartz.macosforge.org/landing/ XQuartz-2.7.4.dmg
(2) ImageMagick installer
http://cactuslab.com/imagemagick/
ImageMagick 6.8.4-8 for Mac OS X 10.5 – 10.8
With FreeType support. Requires XQuartz. (9.8 MB) ImageMagick6.8.4-8-with-X.pkg.zip
(3) brew install imagemagick --with-x11
==> Installing imagemagick dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-
######################################################################## 100.0%
==> Pouring pkg-config-0.28.mountain_lion.bottle.tar.gz
# /usr/local/Cellar/pkg-config/0.28: 10 files, 636K
==> Installing imagemagick
==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6
######################################################################## 100.0%
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/loca
==> make install
# /usr/local/Cellar/imagemagick/6.8.0-10: 1405 files, 45M, built in 83 seconds
上記の(2)はどのように影響するのかわかっていない。
% display -list configure | egrep '^DELEGATES|^VERSION'
DELEGATES bzlib fontconfig freetype jpeg jng png x11 xml zlib
VERSION 6.8.0
文頭のエラーで動かないときは、DELEGATESに x11 がないときのようだ。
2013年4月15日月曜日
2013年4月12日金曜日
iMac-07 wol
imac2を常用して、待機させているimacを使うとき、Wake On Lanが便利そうで、疎通したのが良くわかるように下記の<wol.sh>を書いた。
% wol.sh .... 使用例
(0) 06:58:15 Request timeout for icmp_seq 0
(1) 06:58:17 Request timeout for icmp_seq 0
(2) 06:58:19 Request timeout for icmp_seq 0
(3) 06:58:21 64 bytes from 192.168.1.51: icmp_seq=1 ttl=64 time=0.649 ms
imac is alive.
%
<wol.sh>
#! /bin/zsh
PHOST=imac
PWMAC="D4:9A:20:xx:xx:xx"
CUR=0
echo -n "($CUR) `date "+%H:%M:%S"` "
PLINE=`ping -t 2 -c 2 $PHOST 2&>1 |egrep '^64|^Req|down'|tail -1`
echo $PLINE
WORD1=`echo $PLINE |awk '{print $1}'`
if [ "${WORD1}" = "64" ]; then
echo "$PHOST is alive."
exit 0
fi
# Wake-On-Lan
# http://www.gcd.org/sengoku/docs/wol.c
/usr/local/bin/wol 192.168.1.255 $PWMAC
while (true)
do
CUR=`expr $CUR + 1`
echo -n "($CUR) `date "+%H:%M:%S"` "
PLINE=`ping -t 2 -c 2 $PHOST 2&>1 |egrep '^64|^Req|down'|tail -1`
echo $PLINE
WORD1=`echo $PLINE |awk '{print $1}'`
if [ "${WORD1}" = "64" ]; then
echo "$PHOST is alive."
exit 0
fi
done
exit 0
2013年4月11日木曜日
iMac-06 Emacs24.3
http://emacsformacosx.com/
% wget http://bandwidth.porkrind.org/emacs-builds/Emacs-24.3-universal-10.6.8.dmg
% ls -l Emacs-24.3-universal-10.6.8.dmg
-rw-rw-r--@ 1 usr grp 49060173 3 11 18:31 Emacs-24.3-universal-10.6.8.dmg
% shasum Emacs-24.3-universal-10.6.8.dmg
1ee96baa50806b255d2114549acf2e6710949213 Emacs-24.3-universal-10.6.8.dmg
% wget http://bandwidth.porkrind.org/emacs-builds/Emacs-24.3-universal-10.6.8.dmg
% ls -l Emacs-24.3-universal-10.6.8.dmg
-rw-rw-r--@ 1 usr grp 49060173 3 11 18:31 Emacs-24.3-universal-10.6.8.dmg
% shasum Emacs-24.3-universal-10.6.8.dmg
1ee96baa50806b255d2114549acf2e6710949213 Emacs-24.3-universal-10.6.8.dmg
M-x version
GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org
・起動
/Applications/Emacs.app/Contents/MacOS/Emacs -r &
/Applications/Emacs.app/Contents/MacOS/Emacs -r -f resume-windows &
・elファイルの場所
/Applications/Emacs.app/Contents/Resources/site-lisp
emacs-version 23.3b を長く使っていたが、この24.3は体感として速くなった。
によると、非互換部分があるようだが、いまのところ問題ない。
□Mewのメモ
http://www.mew.org/Release/mew-6.5.tar.gz
configure --with-elispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/mew --with-etcdir=/Applications/Emacs.app/Contents/Resources/site-lisp/mew/etc --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs
このバージョンでメール送信するとメールヘッダのX-Mailerは、
|X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO)
となっており、Mule バージョンは『源氏物語』の巻名で、23「賢木」から24「花散里」になったようだ。
□C-Space (^スペース)
Mark set で、Spotlight検索になる。これはシステム環境設定>キーボードで、
キーボードショートカットの「Spotlight検索フィールドを表示」のチェックを外した。
http://www.mew.org/Release/mew-6.5.tar.gz
configure --with-elispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/mew --with-etcdir=/Applications/Emacs.app/Contents/Resources/site-lisp/mew/etc --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs
このバージョンでメール送信するとメールヘッダのX-Mailerは、
|X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO)
となっており、Mule バージョンは『源氏物語』の巻名で、23「賢木」から24「花散里」になったようだ。
□C-Space (^スペース)
Mark set で、Spotlight検索になる。これはシステム環境設定>キーボードで、
キーボードショートカットの「Spotlight検索フィールドを表示」のチェックを外した。
2013年4月10日水曜日
iMac-05 iTerm2
http://www.iterm2.com/
% wget http://iterm2.googlecode.com/files/iTerm2-1_0_0_20130319.zip
% unzip iTerm2-1_0_0_20130319.zip
% mv iTerm.app /Applications/Utilities
アプリケーション>ユーティリティ>iTerm.app を起動、もしくは、
/Applications/Utilities/iTerm.app/Contents/MacOS/iTerm &
iTerm>Preferences>Profiles>Colors> .... 好みの色に
Foregroundを緑に、Backgroundを黒に
iTerm>Preferences>Profiles>Text> .... 好みのフォントとサイズに
Regular Fontを18pt Andale Monoに
Non-ASCII Fontを18pt Andale Monoに
※[Change Font]>Collection>等倍>Andale Mono を選ぶ
% wget http://iterm2.googlecode.com/files/iTerm2-1_0_0_20130319.zip
% unzip iTerm2-1_0_0_20130319.zip
% mv iTerm.app /Applications/Utilities
アプリケーション>ユーティリティ>iTerm.app を起動、もしくは、
/Applications/Utilities/iTerm.app/Contents/MacOS/iTerm &
iTerm>Preferences>Profiles>Colors> .... 好みの色に
Foregroundを緑に、Backgroundを黒に
iTerm>Preferences>Profiles>Text> .... 好みのフォントとサイズに
Regular Fontを18pt Andale Monoに
Non-ASCII Fontを18pt Andale Monoに
※[Change Font]>Collection>等倍>Andale Mono を選ぶ
iTerm>Preferences>Profiles>Window> .... 好みに透過させる
Window AppearanceのTransparency:を右のTransparent側にふる
Window AppearanceのTransparency:を右のTransparent側にふる
iMac-04 スクリーンショット SimpleCap
ウィンドウのスクリーンショットは標準では「コマンド+Shift+4+Space」でデスクトップにPNGファイルが取れるようだが面倒だ。
http://xcatsan.com/simplecap/ を長く愛用させてもらっている。
起動後はマウスでカメラのようなアイコンをクリックするか、ショートカット「option+command+0」9 にてウィンドウのキャプチャする。
環境設定で保存場所を好きなところに変えて、ログイン時に起動を有効にした。
2013年4月9日火曜日
iMac-03 Homebrew
パッケージ管理システムは Mac Ports にお世話になっていたが、Homebrew にする。
こちらのページが良記事にて参照させていただいた。
(1)Java for OS X 2013-002 1.0 .... Javaランタイムインストール
% java --version
Unrecognized option: --version
Could not create the Java virtual machine. ... ポップアップが出るのでインストール
% java -version .... 確認
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
% ls -l /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
rwxr-xr-x 1 root wheel 10 4 9 16:52 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0 -> CurrentJDK
MacOSXは何がどこにインストールされたか解りにくい。知らなくても良いと云われればその通りだが、容量が知りたかったり、そこのここだけをバックアップしたいこともある。Java Runtime は /System/Library/Frameworks/JavaVM.framework のようだ。
むかしむかしJava for OS X 2012-001にてXcodeまたはアプリケーションローダーツールのユーザに影響を与えるバグがあり痛い目にあったことがある。
(2)Command Line Tools
MacAppStoreで配布されているXcode内からインストール
Xcode>Preferences>Downloadsタブ>Components『Command Line Tools』を選ぶ
(3)http://mxcl.github.io/homebrew/を見て brew のインストール
% ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
% which brew
/usr/local/bin/brew
% brew doctor
Your system is raring to brew. .... これが出ればOKのよう。
% brew update
(4)brewを使ってみる
% brew install wget
% brew search sox
sox
% brew search mplayer
mplayer
% brew search kermit
c-kermit
% brew -v
Homebrew 0.9.4
% brew install gpg
% brew install gnu-tar
% brew install gnu-tar
iMac-02 ssh,ftp,マウス設定など
(1) コンピュータ名
システム環境設定>共有>コンピュータ名: iMac2 とした。
(2) マウスの右クリックを有効
システム環境設定>マウス>ポイントとクリック
□ 副ボタンのクリック(右側をクリック) にチェックを入れる。
% ssh-keygen -t dsa .... id_dsaとid_dsa.pub鍵生成
# diff /etc/sshd_config.org /etc/sshd_config .... 変更差分 dsaとX11使う
50c50
< AuthorizedKeysFile .ssh/authorized_keys
---
> AuthorizedKeysFile .ssh/authorized_keys2
98,99c98,99
< #X11Forwarding no
< #X11DisplayOffset 10
---
> X11Forwarding yes
> X11DisplayOffset 10
システム環境設定>共有>コンピュータ名: iMac2 とした。
(2) マウスの右クリックを有効
システム環境設定>マウス>ポイントとクリック
□ 副ボタンのクリック(右側をクリック) にチェックを入れる。
□ スクロールの方向:ナチュラル のチェックを外す。
(3)sshの設定% ssh-keygen -t dsa .... id_dsaとid_dsa.pub鍵生成
# diff /etc/sshd_config.org /etc/sshd_config .... 変更差分 dsaとX11使う
50c50
< AuthorizedKeysFile .ssh/authorized_keys
---
> AuthorizedKeysFile .ssh/authorized_keys2
98,99c98,99
< #X11Forwarding no
< #X11DisplayOffset 10
---
> X11Forwarding yes
> X11DisplayOffset 10
そして システム環境設定>共有>リモートログイン を入にする。
(4) ftpdを有効に
# launchctl load -w /System/Library/LaunchDaemons/ftp.plist
# netstat -an -f inet -p tcp|egrep '^Proto|\*\.21' .... 21番ポートLISTENしてる確認
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 *.21 *.* LISTEN
# lsof -nP -iTCP -sTCP:LISTEN|egrep '^COMM|\*\:21' .... 21番ポートLISTENしてる
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 1 root 47u IPv4 0xecde69701392329f 0t0 TCP *:21 (LISTEN)
launchd 1 root 58u IPv6 0xecde697020177c77 0t0 TCP *:21 (LISTEN)
ftpはいまだ、Emacsにて Find file: /ftp:imac2:/Users/username/ とかで使っている。
登録:
投稿 (Atom)
