Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

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!
/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):
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:
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/ 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

port search octave [to list all Octave packages]
[Update 12/24/2008:]
[Update 6/15/2010:]

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 outdated''
port install qtplay [command-line audio/mp3 player using Quicktime]
port upgrade outdated [from time to time]
Install Carbon Emacs, 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 AppleShowAllFiles TRUE [To see .emacs, etc., in Finder]
Install latest Faust:
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:
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 ~/bin/dvi2pso:
#!/bin/tcsh -f
# convert .dvi to .ps and open in Preview
# mkdir -p /tmp/dvi2pso
dvips -f $1 -o /tmp/dvi2pso/$
open /tmp/dvi2pso/$
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 commands:
cd ~/bin
mkdir -p
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 Preview.)
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:

Table 1: Left/middle/right mouse-click equivalences
X11   Mac OS X
left-click = click
middle-click = option-click
right-click = command-click $\eqsp $ two-finger click

Install Xquartz = updated X11 for Mac OS X []
svn checkout svn+ssh:// ./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 chose PCL.
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 reassigned.
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 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 obtained from
(could not compile latest CVS because it requires Qt built with Carbon support)
Install (the smaller) MidiKeys 1.7b
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:
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 [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, and 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.

defaults write _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/ 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

Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download mycomputers.pdf
[Comment on this page via email]

``My Computers'', by Julius O. Smith III, Web document.
Copyright © 2015-11-29 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University