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.)
- 1.
- 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
file.3
- 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.)
locate ".vmdk"
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
- 2.
- /usr/bin/chsh -s /bin/tcsh me
- 3.
- sudo scutil -set HostName newhostname.local
- 4.
- Copy Linux versions of ~/.tcshrc and
~/.emacs and customize as needed
- 5.
- Make Caps Lock another Control key
(System Preferences / Keyboard & Mouse / Keyboard / Modifier Keys / CapsLock Key: Control)
- 6.
- sudo /usr/libexec/locate.updatedb
[Make locate work - Note that this is arguably obsoleted now by Spotlight]
- 7.
- 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
- 8.
- Install X11 from Optional Installs on the Mac OS X installation disk
- 9.
- Download Xcode 3.0 disk image [have to register as an Apple developer]
- 10.
- Change the root password [seems to be required before you can su]
- 11.
- Add known hosts to /etc/hosts as usual [no app seems to own this]
- 12.
- Check out Subversion repo containing my project-independent personal data
- 13.
- Install MacPorts package: http://guide.macports.org
- 14.
- sudo port selfupdate [port installs binaries in /opt/local/bin so add to path]
- 15.
- sudo port install pure q latexdiff latex2html gnupg
- 16.
- sudo port install octave octave-signal octave-audio sox
- 17.
- Octave note: To compile .oct files, add the following lines
CFLAGS="-m32 ${CFLAGS}"
FFLAGS="-m32 ${FFLAGS}"
CPPFLAGS="-m32 ${CPPFLAGS}"
CXXFLAGS="-m32 ${CXXFLAGS}"
LDFLAGS="-m32 ${LDFLAGS}"
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)
- 18.
- 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
http://octave.sourceforge.net/
- 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.)
- 19.
- sudo port install openssl [wget needed by older octave-forge build]
- 20.
- 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]
- 21.
- 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''
- 22.
- port install qtplay [command-line audio/mp3 player using Quicktime]
- 23.
- port upgrade outdated [from time to time]
- 24.
- 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.
- 25.
- Firefox installed from Web download
- 26.
- defaults write com.apple.finder AppleShowAllFiles TRUE [To see .emacs, etc., in Finder]
- 27.
- 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.
- 28.
- 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:
- There were display problems that began after xorg.conf
as written by the VMware tools (I simply backed out to the previous
xorg.conf).
- 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!
I also needed to do the following for VMware Tools:
- 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.]
- 29.
- Installed tcsh (my emacs shell) and octave
and their dependencies from Cygwin into Windows virtual machine.
- 30.
- Make it easy to reload PDF files in Preview:
http://www.macosxhints.com/article.php?story=2006010200141989
- 31.
- 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/$1.ps
open /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
commands:
cd ~/bin
mkdir -p dvi2pso.app/Contents/MacOS/
cd 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.
- 32.
- 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.)
- 33.
- 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.]
- 34.
- 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 two-finger click |
|
- 35.
- Install Xquartz = updated X11 for Mac OS X [http://xquartz.macosforge.org/trac/wiki]
- 36.
- 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]
- 37.
- To be able to see the HP LaserJet 1220 printer on my Linux machine,
I first tried CUPS printing:
http://www.trollop.org/articles/2007/10/31/linux-printer-sharing-with-mac-os-x-105-leopard/
http://www.wikihow.com/Share-a-Cups-Printer-With-Apple-Mac-Os-X
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.''
- 38.
- 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.
- 39.
- port install gv [I use it to generate 2up and 4up EPS files, among other things]
- 40.
- 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.
- 41.
- port install mpage [Used to print 2-up via the shell alias
'mpage -2 -H -bLetter -f \!* | lpr -l'
]
- 42.
- 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
- 43.
- Download and install 64-bit version of Pd-extended
[surprisingly hard to find in a search result!]
- 44.
- Install Tcl/Tk Aqua
(standalone version) (Daniel A. Steffen maintains) [To install Wish.app for use with Mac OS X version of Pd-extended]
- 45.
- 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).
- 46.
- Install the Virtual MIDI Piano Keyboard (vmpk):
Mac universal binary vmpk.app obtained from
http://sourceforge.net/vmpk/
(could not compile latest CVS because it requires Qt built with
Carbon support)
- 47.
- Install (the smaller)
MidiKeys 1.7b
but unfortunately it is compiled for PowerPC only! (and no source)
- 48.
- 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''.
- 49.
- port install qt4-mac [needed by faust2coreaudio]
- 50.
- 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]
- 51.
- port install pure-devel [needed by pd-pure-0.4
- 52.
- port install mercurial [needed by next command:]
- 53.
- hg clone http://freehg.org/u/cozzyd/tabsynth/
[graphics-tablet synthesis control]
- 54.
- cd /usr/local/bin; ln -s qmake-mac qmake [no idea why this was necessary, but it makes faust2coreaudio work ok.]
- 55.
- sudo perl -MCPAN -e shell; install HTML::WikiConverter [for a project]
- 56.
- port deactivate libungif; port install qjackctl [messing with faust2jack on the Mac]
- 57.
- 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, ...
- 58.
- port remove 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
http://www.tug.org/mactex/
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)
I reported the problem to
trac.macports.org, 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.
- 59.
- defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES [make directory paths visible atop Finder windows]
- 60.
- 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).
- 61.
- man opendiff
Subsections
Next |
Prev |
Up |
Top
|
JOS Index |
JOS Pubs |
JOS Home |
Search
Download mycomputers.pdf
[Comment on this page via email]