I've been a longtime Mac user and fan, from way back in 1985 when my father bought the very first 128K Mac toaster. In graduate school and during my postdoc, I primarily used SGIs and Suns. I've been using Windows quite a bit, as it is what runs on my Toshiba and Sony laptops (I've tried linux, but I really needed Microsoft Office compatibility, so I found I never used it). It did seem Apple was behind the times for a while, but with OS X they got it right. If I buy another laptop, it will be a Powerbook. OS X simply stomps the daylights out of Windows XP; everytime I sit down to use a Windows box now I have an urge to hurl. I spent a lot of time getting Windows XP installed on my wife's PC, and trying to get all her hardware working with it. Yes, Windows is more prevalent, compatible, etc., but the Mac OS just works better.
Anyway, below are some notes to help make your OS X machine lean and mean (well, not so lean, but definitely mean). Anytime I need to set up a new Mac, I run through the notes on this page to make sure I've covered everything.
Note that in OS X you can type "open filename" at the command line, and it will open the file with whatever the default program is. So while on a unix system you might type "acroread paper.pdf," in OS X you will type "open paper.pdf"
I like to have a symbolic link "u" sitting in the root directory to point
to my mounted fileshare, so I can reference files like /u/tex/myproposal.
To set up this link, you can do:
sudo ln -s /Volumes/yamsa.ece.gatech.edu /u
It will probably prompt you for the admin password.
You can put custom commands in the Applications menu in Apple's X11. I like to customize Terminal like this:
xterm -sl 1000 -sb -rightbar
I also like to set up custom commands to log into different machines, for instance, a Bigzilla command which executes
xterm -sl 1000 -sb rightbar -title bigzilla -e ssh bigzilla.ece.gatech.edu
There seems to be a horrible bug in the Apple X11 Customize window which takes bits of text in the window and copies it to things you click on when you distinctly don't want it to do that. Luckily, you can edit the customizations directly by modifying the text file
/Users/lanterma/Library/Preferences/com.apple.x11.plist
(Clicking on the above link will show you my X11 customization file.)
It is set up as an OS X Application, meaning you can just double-click on it. The menus show up along the very top of the screen as in a usual Mac application. I like putting Emacs in the Application folder and also dragging it to the Dock for fast access.
The Emacs that comes standard with Mac OS X is a non-fancy version that doesn't know about mice and other such things. To be able to run the fancy Jaguar version you downloaded from the command line, you need to do something like the following from a Terminal or xterm:
cd /usr/bin % find the standard boring Emacs
sudo mv emacs emacs_old % move it elsewhere
and make a new file called "emacs" (also need to use sudo to be able to edit files in /usr/bin, i.e. "sudo vi emacs") containing:
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"
Then do
sudo chmod a+x emacs
so it's runnable as a script.
Now when you type Emacs from the command line, it brings up the cool Panther version of Emacs.
(setq auto-mode-alist
(cons '("\\.tex\\'" . latex-mode) auto-mode-alist))
(define-key esc-map "G" 'goto-line)
You can type Escape, capital-G, and then a line number to quickly go to a specific line. Also, putting in this line will make it automatically put different syntatic features in different colors for LaTex, C, HTML, whatever...
(global-font-lock-mode 1)
Here's some old information from when I was running Jaguar, in case that's useful to anyone:
There's a nice Postscript viewer called MacGSView that now has a Mac OS X version. I happened to run across it at ftp://ftp.cs.princeton.edu/pub/cs126/software but you can probably find it elsewhere as well. (Note: when you download this, you'll find that the filename is too long for Mac OS X. It will truncate at the period and try to interpret it as an MS Word file. So, use save to disk, and give it a smaller filename so the .sit stays intact.)
After you install Fink, you'll need to add this line to your .bashrc file in your home directory:
source /sw/bin/init.csh
To get programs, run sudo dselect
There's two ways to use fink. One way is from the unix command lind. The sudo tells the computer to run dselect as root, so that it can modify necessary things.
The dselect interface is ASCII terminal based, and so it's a bit clunky, but it's better than the raw fink command line interface. Using dselect, you first always want to [U]pdate the list of available packages. Then you [S]elect the packages you want. Once dselect is happy with your selections, you can [I]nstall them.
Selecting packages can get a bit confusing. Fink will want you to install other packages which the package you want depends on. In general, you want to go ahead and install everything it recommends, with a few important exceptions. One important exception is X windows applications, which will generally ask you to install various things with "xfree86" in the name. If you've already installed OroborOSX as described above, you already have free86 floating around, and you don't want fink trying to install a new one. So, you want to turn off installation of anything xfree86ish, except you do want to "install" system-xfree86, which is just a placeholder to let Fink know you've previously installed free86.
After you install something with Fink, it's a good idea to type source .bashrc to make sure the system knows that new things have appeared.
To be able to access the programs, you'll need to set your PATH and MANPATH variables properly in your .bashrc file (in Panther). For instance:
export PATH=$PATH:/usr/local/bin:/Applications/MATLAB6p5p1/bin:/Developer/Tools:/usr/local/teTex/bin/powerpc-apple-darwin-current
export MANPATH=$MANPATH:/usr/local/man:/usr/local/teTex/man
Before you run dselect to install LaTex, you need to run the following command from the prompt (for some reason, texmf won't install it using dselect, so you need to use fink directly):
fink install tetex-texmf
Now use dselect to install bundle-tetex. That's the full installation of tex-related goodness which we come to expect on our unix systems. When installing this, you have to careful to tell it to install everything it recommends, except for system-tetex, which is a placeholder that we usually don't want (this is the opposite of an X Windows application, where we do want to use the xfree86 placeholder). Having system-tetex selected generally screws up everything else. (For some reason, Fink insists on highlighting it to install. You have to use capital-Q in order to force your selection on Fink and get bundle-tetex to install. You may have to go through several iterations to get everything installed.) Getting LaTex installed was the most painful of all the steps listed on this page... it's the one place where Fink gave me trouble. Remember, system-tetex is bad news here.
I was able to get the Matlab 7 to talk to the campus license server with no problem (I never could with the older versions of Matlab.)
export TERM=xterm-color
source /sw/bin/init.sh
alias clean='rm -f *~ *# *.aux *.blg *.log *.dvi'
#note you don't want to this script to
export PATH=$PATH:/usr/local/bin:/Applications/MATLAB704/bin:/Developer/Tools:/usr/local/teTex/bin/powerpc-apple-darwin-current
export MANPATH=$MANPATH:/usr/local/man:/usr/local/teTex/man
export CLICOLOR=true
export LSCOLORS=exfxcxdxbxegedabagacad
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
#delete the aux files; latex needs this available
#on multiple passes!
lt() {
if [ -e "$@".tex ]; then
latex "$@"
bibtex "$@"
latex "$@"
dvips -G0 -Ppdf -o "$@".ps "$@".dvi
rm -f "$@".dvi
ps2pdf "$@".ps
rm -f "$@".ps "$@".blg "$@".log
open "$@".pdf
else
echo "file does not exist"
fi
}