Setting Up an OS X Mac with The Usual Suspects

Some Tricks

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”

This “open” command is pretty flexible. It basically simulates a double-click. If you give it a folder or application, it will open that folder or application. “open -a application file” opens a file in the specified application, and “open http://website” opens a website in the default browser. “open -e file” will open the file in TextEdit.

Useful Programs

  • I love TextMate. Yes, I bought it. Yes, I know there are a lot of editors out there, many of them free. I just really really really like it.
  • Fugu is a fantastic file transfer (SFTP/SCP/SSH) client.
  • You can get LaTex in several ways. I think the easiest way is to use the MacTeX package. Downloading it from the main MacTeX website is extremely slow, so I suggest trying to find it at a mirror. You run the installer, and everything happens by magic.
  • The Gimp is a rather nice open source image manipulation tool, similar to Photoshop.

Aaron’s .bashrc file

Here’s my .profile file (this is started by “login shells,” such as the Terminal). My .bashrc file (started by “non-login shells,” which includes xterms) just says “source .profile,” since as if right now I don’t need them to be different. Among other cool things, this causes directory listings to show up in color. (The color scheme doesn’t work well against the black background, so I use the “Basic” Terminal window style. Another Terminal tip: Try turning on anti-aliasing, and setting your font to 12-point Monaco.) Note there’s also a “clean” alias which lets you clean up the backup files that emacs makes, along with various temp files that LaTex creates.


export PATH=/opt/local/bin:/opt/local/sbin:$PATH 
export DISPLAY=:0.0 
export EDITOR=/usr/bin/mate 
export TERM=xterm-color 
export CLICOLOR=true 
export LSCOLORS=exfxcxdxbxegedabagacad 

# source /sw/bin/init.sh

alias clean='rm -f *~ *# *.aux *.blg *.log *.dvi'
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

#note you don't want to this script to
#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
}