Leopard (10.5) 向けのメモです。Snow Leopard (10.6)でも大体そのまま使えるけど
$ cd /Library/Developer/3.0/ $ sudo ./uninstall-devtools --mode=all $ sudo rm -rf /Library/Developer/3.0/
$ vi .bashrc export PATH=/opt/local/bin:/opt/local/sbin:$PATH $ source .bashrc $ sudo port -d selfupdate Password: DEBUG: Rebuilding the MacPorts base system if needed. DEBUG: Synchronizing ports tree(s) Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/ ... $ sudo port -d sync
$ port list | more
$ port list | grep gimp gimp-app @2.6.0 aqua/gimp-app macclipboard-gimp @0.7 aqua/macclipboard-gimp macfile-gimp @0.1 aqua/macfile-gimp gimp @2.6.3 graphics/gimp gimp-gap @2.4.0 graphics/gimp-gap gimp-jp2 @2.2.0 graphics/gimp-jp2 gimp-lqr-plugin @0.5.1 graphics/gimp-lqr-plugin gimp-user-manual @2.4.2 graphics/gimp-user-manual gimp2 @2.6.3 graphics/gimp2 icns-gimp @0.1 graphics/icns-gimp p5-gimp @2.0 perl/p5-gimp gimp-print @4.2.7 print/gimp-print
$ sudo port install gimp2
$ sudo port uninstall gimp2
$ sudo port upgrade gimp2
$ port outdated
$ sudo port upgrade installed
$ port variants gimp2 gimp2 has the variants: darwin_7: Platform variant, do not select manually darwin_9: Platform variant, do not select manually no_python: Disable Python scripts and filters dbus: Enable dbus support gvfs: Enable gvfs support help_browser: Enable Gimp help browser quartz: Enable Quartz rendering x11: Enable rendering in X11 (default) no_x11: Build without X Windows support universal: Build for multiple architectures
$ sudo port install gimp2 (+variants)
$ sudo port -d install kinput2
$ sudo launchctl load -w /opt/local/etc/LaunchDaemons/org.macports.canna/org.macports.canna.plist $ ps -ax | grep canna 38880 ?? 0:00.01 /opt/local/bin/daemondo --label=canna --start-cmd /opt/local/etc/LaunchDaemons/org.macports.canna/canna.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.canna/canna.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.canna/canna.wrapper restart ; --pid=none 38885 ?? 0:00.00 /opt/local/sbin/cannaserver -u canna -syslog 38887 ttys000 0:00.00 grep canna
$ mkdir .MacOSX $ vi ~/.MacOSX/environment.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>LANG</key> <string>ja_JP.UTF-8</string> <key>XMODIFIERS</key> <string>@im=kinput2</string> </dict> </plist>
$ cat /etc/launchd.conf setenv XMODIFIERS @im=kinput2 setenv LANG ja_JP.UTF-8
/.launchd.conf でもいいはず何だけど、上手いこといかない
$ cd /opt/X11/lib/X11/xinit/xinitrc.d/ $ ls 10-fontdir.sh 20-kinput2.sh 99-quartz-wm.sh $ cat 20-kinput2.sh [ -x /opt/local/bin/kinput2 ] && /opt/local/bin/kinput2 &"chmod +x 20-kinput2.sh" も忘れずに
$ cat .Xresources Kinput2*ConversionStartKeys: Shift<Key>space
$ sudo port install rxvt-unicode
$ cat .Xresources Kinput2*ConversionStartKeys: Shift<Key>space URxvt.background: Black URxvt.foreground: Snow URxvt.scrollstyle: next URxvt.scrollBar_right: true URxvt.geometry: 80x24 URxvt.termName: rxvt Urxvt.saveLines: 20000 URxvt.font:\ xft:Bitstream Vera Sans Mono:size=12:antialias=true(設定の反映)
$ xrdb -merge .Xresources
$ urxvt -vbvb = Visual Bell (http://linux.die.net/man/1/urxvt)
$ sudo port install gimp2 gimp-app gimp-print icns-gimp macfile-gimp gimp-user-manual kinput2 gvfs;
$ sudo port uninstall -f pango $ sudo port clean --archive pango $ sudo rm /opt/local/lib/pkgconfig/cairo-quartz-font.pc $ sudo port install pango
[/opt/local/etc/fonts/conf.d/63-hiragino.conf] <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <alias> <family>serif</family> <prefer> <family>Hiragino Mincho Pro</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>Hiragino Kaku Gothic Pro</family> </prefer> </alias> <match target="font"> <test name="family" compare="eq"> <string>ヒラギノ明朝 Pro</string> <string>ヒラギノ明朝 ProN</string> <string>ヒラギノ丸ゴ Pro</string> <string>ヒラギノ丸ゴ ProN</string> <string>ヒラギノ角ゴ Pro</string> <string>ヒラギノ角ゴ ProN</string> <string>ヒラギノ角ゴ Std</string> <string>ヒラギノ角ゴ StdN</string> <string>Hiragino Mincho Pro</string> <string>Hiragino Mincho ProN</string> <string>Hiragino Maru Gothic Pro</string> <string>Hiragino Maru Gothic ProN</string> <string>Hiragino Kaku Gothic Pro</string> <string>Hiragino Kaku Gothic ProN</string> <string>Hiragino Kaku Gothic Std</string> <string>Hiragino Kaku Gothic StdN</string> </test> <edit name="hinting" mode="assign"> <bool>false</bool> </edit> <edit name="embeddedbitmap" mode="assign"> <bool>false</bool> </edit> </match> </fontconfig>
bash-3.2$ ssh -l kagyuu 192.168.1.6 Password: Last login: Sat Dec 27 18:05:51 2008 from 192.168.1.8 Have a lot of fun... kagyuu@grape:~>
bash-3.2$ /usr/X11R6/bin/Xnest :1 -query 192.168.1.6 -geometry 800x600
2009-10-10追記
Snow Leopard (10.6) では、Xnest が不安定なので、Xephyr を使うのが吉
[~]$ Xephyr :1 -query 192.168.1.6 -screen 800x600
bash-3.2$ cat wma2mp3.sh #!/bin/sh DIR=/Volumes/RADIOSERVER/RADIO/FM BKUP=/Volumes/RADIOSERVER/RADIO/Old ls $DIR | grep ".*WMA$" | while read line do /opt/local/bin/ffmpeg -y -i $DIR/$line -acodec libmp3lame -vn -ab 128k $DIR/${line%.WMA}.mp3 < /dev/null mv $DIR/$line $BKUP echo $line done bash-3.2$
[~]$ cat .bashrc export PATH=/opt/local/bin:/opt/local/sbin:$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH export PS1="[\w]\$ " export PAGER="/opt/local/bin/less -R" [~]$ source .bashrcless はすでにインストールされていたけど、Mac Port でインストールしたのかなぁ・・・?
ssh -l kagyuu 192.168.1.6
[~]$ cat .bash_profile source ~/.bashrc [~]$ cat .bashrc export PATH=/opt/local/bin:/opt/local/sbin/:$PATH export PS1="[\w]\$ " export PAGER="/opt/local/bin/less -R" [~]$