JOS Index |
JOS Pubs |
JOS Home |
Getting Up and Running in Mac OS X (Leopard and then Snow Leopard)
Below is my blog on how I configured my Mac Pro (in late 2008, after many years
running Linux and Windows). Later sections describe (in
reverse-chronological order) my software setups for Linux and Windows.
(Section 15 below gives a corresponding reverse-chronological log of
hardware purchased and built for my setup.)
- Install VMware, which then installed Windows XP unattended!
- My first headbutt was that the virtual Windows machine could not
see the other Windows machines in its ``work group''. A second
problem was that Bonjour could see the printers shared on my
network, but any attempt to print to them from Safari caused Safari
to hang forever. As usual, an Internet search came quickly to the
rescue. Both these problems were fixed by the same change: It turns
out the network mode of the virtual machine must be bridged
(not ``shared with the host'', which is the default) in order to see
other members of the Windows workgroup. In other words, the vm must
be ``directly connected'' to the network. (With the virtual machine
running, go to ``Virtual Machine / Settings / Network'' in VMware,
change the mode, reboot the vm, and try clicking on ``View workgroup
computers'' in (virtual) Windows.)
- Copy setup program for Beyond Compare 2 and install it.
- Copy Windows personal data using Beyond Compare (a simple copy failed
because there was a cyclic-redundancy check failure on one file).
- Note that Norton Ghost failed to either copy the drive or
restore a check point, presumably due to that one bad
- When I set up the Windows virtual machine, I thought it would be easy to enlarge it as needed. I was wrong:
- Search the Web for someone's story (nothing in the VMware menus or even doc that I could find).
- Delete the snapshot I had made after I first got Windows
installed up to Service Pack 3 (you can't resize a virtual machine
with any snapshots). (From now on, my ``snapshots'' will be copies
of the directory package, compressed by bzip2.)
alias vdm '/Library/Application\ Support/VMware\ Fusion/vmware-vdiskmanager'
vdm -x 100GB myWindowsXPDisk.vmdk
- Install and run Partition Magic (!) on the virtual machine to enlarge the disk partition within Windows XP
- /usr/bin/chsh -s /bin/tcsh me
- sudo scutil -set HostName newhostname.local
- Copy Linux versions of ~/.tcshrc and
~/.emacs and customize as needed
- Make Caps Lock another Control key
(System Preferences / Keyboard & Mouse / Keyboard / Modifier Keys / CapsLock Key: Control)
- sudo /usr/libexec/locate.updatedb
[Make locate work - Note that this is arguably obsoleted now by Spotlight]
- Automate mounting of samba shares as follows (from the Web):
- Make sure shares are connected in the Finder
- Access the ``Login Items'' tab in ``System Preferences / Accounts''
- Click the plus sign [+] and choose the desired Volume
- Install X11 from Optional Installs on the Mac OS X installation disk
- Download Xcode 3.0 disk image [have to register as an Apple developer]
- Change the root password [seems to be required before you can su]
- Add known hosts to /etc/hosts as usual [no app seems to own this]
- Check out Subversion repo containing my project-independent personal data
- Install MacPorts package: http://guide.macports.org
- sudo port selfupdate [port installs binaries in /opt/local/bin so add to path]
- sudo port install pure q latexdiff latex2html gnupg
- sudo port install octave octave-signal octave-audio sox
- Octave note: To compile .oct files, add the following lines
in the file /Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.2.3
after the "set -e" line. The problem was that in Snow Leopard compilers
try always to build in 64bit, while libraries shipped with Octave
are 32 bit. The -m32 flag forces the compiler to build 32bit
programs. (From http://www-old.cae.wisc.edu/pipermail/help-octave/2009-October/016456.html)
- port search octave [to list all Octave packages]
- [Update 12/24/2008:]
- sudo port uninstall octave
- Download and install octave.app.dmg from the sourceforge Octave download page
- Download and install packages Miscellaneous, Optim, Signal, Audio, etc., from
- ln -s /Applications/Octave.app/Contents/Resources/bin/octave /usr/bin/octave
- ln -s /Applications/GnuPlot.app/Contents/Resources/bin/gnuplot /usr/bin/gnuplot
- ln -s /Applications/Octave.app/Contents/Resources/bin/mkoctfile /usr/bin/mkoctfile
- [Update 6/15/2010:]
- mv /usr/bin/octave /usr/bin/octaveapp
- sudo port install octave-audio octave-benchmark octave-control octave-data-smoothing octave-general octave-ident octave-integration octave-io octave-linear-algebra octave-miscellaneous octave-missing-functions octave-odepkg octave-optim octave-optiminterp octave-plot octave-signal octave-specfun octave-special-matrix octave-spline-gcvspl octave-splines octave-statistics octave-strings octave-struct octave-symband
(It was necessary to hide my /.octaverc file for this to work. The
build, which uses a shell that imported my environment, failed as a
result of something in there. I was able restore it afterwards and
things seem to be fine.)
- sudo port install openssl [wget needed by older octave-forge build]
- mv /usr/bin/texi2html /usr/bin/texi2html-HIDE [older octave-forge build needs the version in /opt/local/bin -- haven't checked all the newly separated packages]
- sudo port install xpdf [not really needed, but I have scripts that expect it]
If this fails for you, try the following:
port uninstall xpdf
port uninstall poppler
port install -f xpdf +with_poppler
(There is a bug in which both xpdf and poppler want to install the
same file. Since xpdf depends on poppler, poppler wins and xpdf
refuses to overwrite the file so its installation fails.) I found I
had to do this again after the usual ``port selfupdate; port upgrade
- port install qtplay [command-line audio/mp3 player using Quicktime]
- port upgrade outdated [from time to time]
which was a lot nicer than the port version (which runs in a Terminal window). Best of all, it uses [command] for meta! -- feels completely normal.
- Firefox installed from Web download
- defaults write com.apple.finder AppleShowAllFiles TRUE [To see .emacs, etc., in Finder]
- Install latest Faust:
- Read-only access to Faust compiler:
git clone git://faudiostream.git.sourceforge.net/gitroot/faudiostream/faudiostream
- Developer (Read-Write access) to Faust compiler:
git clone ssh://USERNAME@faudiostream.git.sourceforge.net/gitroot/faudiostream/faudiostream
I also replace many installed products by symbolic links back to the git clone,
so source edits will immediately take effect without an explicit install.
- As an experiment, I tried installing Fedora 9 in a VMware Fusion
virtual machine (under the latest Mac OS X). To my surprise, it worked
pretty well, except for a few glitches:
I also needed to do the following for VMware Tools:
- There were display problems that began after xorg.conf
as written by the VMware tools (I simply backed out to the previous
- I was able to install planetccrma-core and
planetccrma-apps without difficulty. The real-time
kernel booted without any trouble. However, while JACK sort of
worked (with underruns), it frequently hangs and has to be
killed. Non-JACK sound works fine (using pulseaudio)
from the virtual F9 machine on the Mac!
- yum install kernel-rt-devel [needed to compile VMware Tools with Planet CCRMA real time kernel installed. The Tools compilation requires the path
/usr/src/kernels/<latest-kernel>/include to be entered manually.]
- Installed tcsh (my emacs shell) and octave
and their dependencies from Cygwin into Windows virtual machine.
- Make it easy to reload PDF files in Preview:
- To open .dvi files written by TEX or LATEX, I placed the
following script in
# convert .dvi to .ps and open in Preview
# mkdir -p /tmp/dvi2pso
dvips -f $1 -o /tmp/dvi2pso/$1.ps
To my surprise, I could not set this (executable) file to be the opener
for all .dvi files. However, I could do this after the following
mkdir -p dvi2pso.app/Contents/MacOS/
ln -s ../../../dvi2pso .
It appears the Finder will only allow full fledged applications
to open documents. Maybe this is a security thing.
- To automatically reload changed PDF documents in Preview (very
helpful when writing LaTeX documents, set up the applescript called
``Reload Preview Document 1.0'' by Trevor Harmon. (For this,
inspect (via %1) a PDF document and make sure its opening app is
- port install xfig [I use xfig all the time
under Linux, and I export figures in .fig format from
Octave using the print -dfig command. This allows further
editing, line thickening, etc. The fig2dev program
included with xfig is very useful for converting
.fig files to either PDF or EPS under Makefile control.]
- After some flailing around in xfig, I stumbled upon the following table of equivalences:
Left/middle/right mouse-click equivalences
||Mac OS X
||command-click two-finger click
- Install Xquartz = updated X11 for Mac OS X [http://xquartz.macosforge.org/trac/wiki]
- svn checkout svn+ssh://ccrma-gate.stanford.edu/~jos/svnrc/l2hsvn/trunk ./l2h; cd l2h; ./configure; make; make install [fix some latex2html bugs that often bite me]
- To be able to see the HP LaserJet 1220 printer on my Linux machine,
I first tried CUPS printing:
but this never worked: ``Network host <cups server hostname> is busy; will retry ...''.
I also tried HP IP Printing under the ``More Printers'' button,
entering the IP address of the Linux machine manually (since ``Auto''
failed to find it), and no printers were found.
What worked was, when adding a printer, to choose the Windows
(!) printing button (as opposed to the ``IP'' button), selecting the
Linux host, and finally the printer, which was exported on the local
net via Samba. (I chose the ``HP laserjet 1220'' driver instead of
the ``HP laserjet 1220 Gutenprint'' driver, which I hope was the best
choice.) I also selected ``Print Using Generic PostScript Printer.''
- To be able to access my HP LaserJet 1220 printer under VMware
Windows (on the Mac Pro), I had to first browse to the
printer (or at least its host) under ``My Network Places'' / ``View
workgroup computers'' which triggered a login on that host. Only
after doing that could I successfully browse to the printer under
Control Panel / Printers and Faxes / ``Add a printer'' link. Also,
this is needed after every time the connection is broken! I call
this a Windows XP bug: ``Add a printer'' should trigger the login
while browsing in exactly the same way, but it doesn't. The driver
choices for the laserjet 1220 were ``PCL'' and ``PS (MS)''. My
understanding from a cursory Web search is that the PCL driver is
from HP while any ``MS'' driver is a Microsoft ``native driver.'' I
- port install gv [I use it to generate 2up and 4up EPS files, among other things]
- Add local to the ``Search Domains'' field of the
Network preference pane in System Preferences so that ``ssh
hostname.local'' works on my local subnet. This works in one
direction only: I can access my (fixed-IP-address) Mac Pro from my
(dynamic-IP-address) Macbook Pro, but not the other way around.
This is quite inconvenient, and I think whoever designed DHCP
without reliable automatically exported name support should be
- port install mpage [Used to print 2-up via the shell alias
'mpage -2 -H -bLetter -f \!* | lpr -l']
- cd <faustsource>/Faust/tools/faust2pd-1.0.2; [change q prefix from /usr/local to /opt/local, leave pd prefix unchanged]; make install; make install-pd; ln -s /opt/local/bin/q /usr/local/bin
- Download and install 64-bit version of Pd-extended
[surprisingly hard to find in a search result!]
- Install Tcl/Tk Aqua
(standalone version) (Daniel A. Steffen maintains) [To install Wish.app for use with Mac OS X version of Pd-extended]
- For testing MIDI patches in Pd-extended, one must add the
exported MIDI device(s) under Pd-extended / Preferences / MIDI
Settings. Also, IAC Driver must be activated (see below).
- Install the Virtual MIDI Piano Keyboard (vmpk):
Mac universal binary vmpk.app obtained from
(could not compile latest CVS because it requires Qt built with
- Install (the smaller)
but unfortunately it is compiled for PowerPC only! (and no source)
- Argh! MIDI connections via software disabled by default!
Enable software MIDI connections by activating the IAC driver:
- Launch /Applications/Utilities/Audio MIDI Setup.app
- Select Window / Show MIDI window
- Double-click on ``IAC Driver''
- Select ``Device is online''
- If more than one MIDI port is needed, click on `+'
- Note: The ``Apply'' button is disabled, and the port-number increment-switches don't work, but MIDI seems to work anyway. In Pd, for example, one can choose the device MidiKeys and/or ``VMPK Output'' (when installed and running) and/or ``IAC Driver IAC Bus 1''.
- port install qt4-mac [needed by faust2coreaudio]
- port install aspell-dict-en [needed by aspell (don't know how aspell got installed previously, or why it was installed without any dictionaries, thus rendering it useless and confusing]
- port install pure-devel [needed by pd-pure-0.4
- port install mercurial [needed by next command:]
- hg clone http://freehg.org/u/cozzyd/tabsynth/
[graphics-tablet synthesis control]
- cd /usr/local/bin; ln -s qmake-mac qmake [no idea why this was necessary, but it makes faust2coreaudio work ok.]
- sudo perl -MCPAN -e shell; install HTML::WikiConverter [for a project]
- port deactivate libungif; port install qjackctl [messing with faust2jack on the Mac]
- Originally I did port install texlive +letter, and this worked for a good while, but eventually (by Nov. 2010)
it became broken (texnansi.enc could not be found by dvips). Thus, ...
- port remove texlive
I reported the problem to
was informed that I needed to install texlive-fonts-extra
which contains that file. Another option is to install the
texlive +full variant, which MacTeX-2010 is said to do
internally. For now I am sticking with MacTeX-2010 because it has an
unexpected great feature that MacPorts texlive currently lacks: The
MacTex version of latex+dvips appears to automatically crop the
generated file to the declared papersize. I'm working on a 6x9 book,
and was in the habit of cropping in Adobe Acrobat Pro, but now that
time-consuming manual step is no longer necessary. Another cool
feature worth mentioning is that it installs a System Preferences
panel that allows toggling between the use of MacTeX and texlive; that
is, they are compatible and do not overwrite each other. In
particular, MacTeX installs all of its programs in its own directory
/usr/texbin/ (which you have to add to your shell search
$PATH.) Next time I have a TeX-related headbutt, I'll be able to
easily try the MacPorts version of texlive.
- sudo port -u uninstall [necessary because the following will fail if there is more than one version]
- sudo port uninstall -follow-dependents texlive-basic
- Download MacTeX.mpkg.zip MacTeXtras.zipfrom
The download never ``completed'' but the 1.66 GB file seemed to be ok.
A second download attempt appeard to complete but was only 1.01 GB and would not unzip.
- Install MacTeX-2010
- setenv PATH "/usr/texbin:$PATH"
(The doc says this is done automatically, but it was not for me.)
- reinstall latex2html (configure; make; sudo make install)
- defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES [make directory paths visible atop Finder windows]
- Download and install Deltopia DeltaWalker. This is a passable replacement (on Mac OS X) for Beyond Compare on Windows.
It also has some more advanced features than Beyond Compare since it is based on Eclipse. One can also use FileMerge
(/Developer/Applications/Utilities/FileMerge.app) for this purpose, but I find it harder to use. One can also
use Beyond Compare from a Windows virtual machine running on the Mac under VMware Fusion, operating on ``shared folders'';
however, copying links changes their apparent size so I don't yet trust it. For a quick file diff, I now prefer
opendiff from the command line (which uses FileMerge).
- man opendiff
JOS Index |
JOS Pubs |
JOS Home |
[Comment on this page via email]