Setting Up a Mac
I completely reformatted the hard drives of a couple of Mac laptops a few months ago and did all the installation to make either one useful as my day-to-day machine. There are enough steps (and enough things that I forgot and then later had to interrupt my work to do) that I made a handy reference list for the next time I need to set up a new machine from scratch.
Obviously “useful as a day-to-day machine” is very specific to my needs: my main work involves writing papers and presentations with LaTeX, giving presentations and reading papers with Skim, programming in Java, C++, Python, and Haskell, and of course heavy email and web use.
Here is how I set up a new machine:
- Install Mac OS X from DVD.
- Create an administrator account and log into it:
- Turn off Safari’s “Open safe files after downloading” setting (in the General pane of Safari’s preferences).
- Install SSHKeychain
- Set time zone in the “Date & Time” preference panel.
- Set date format to
YYYY-MM-DD
in the “International” preference panel. - Install developer tools.
- Run Software Update and install all updates.
- Change computer name in the “Sharing” preference panel.
- Create (non-administrator) user account.
- Reboot to finish all updates, and log in under normal user account.
- Set date and time formats in the “International” preference panel.
- Set Energy Saver, Desktop, and Screen Saver preferences.
- Set Dock preferences to automatically hide the dock.
- Turn off auto-play of CDs and DVDs in the “CDs & DVDs” preference panel.
- Connect to external monitor and adjust settings in “Displays” preference panel.
- Pair bluetooth keyboard/mouse, adjust key repeat rate and delay, and set mouse button preferences and speed in “Keyboard & Mouse” preference panel.
- Set up printer.
- Turn off menubar volume control in “Sound” preference panel.
- Remove unwanted cruft from Dock.
- Create “Media” directory under
/Users/Shared
. - Copy films/music to shared media directory. (This can take a long time.)
- Point iTunes at this shared media directory when all the copying is finished
- Change Safari preferences:
- Turn off the “Open safe files after downloading” setting.
- Start at a blank page
- No bookmark bar
- Show status bar
- Install TeX tools:
- Install TextMate
- Set license code.
- Change filter list.
- Set wrap column to 78.
- Don’t re-indent.
- Set latex bundle to use Skim and
LatexMk.pl
.
- Set Finder to open all text files with TextMate and all PDF files with Skim.
- Set up Mail:
- Create IMAP accounts.
- Delete Apple RSS feed.
- Map “Sent” mailboxes.
- Show
X-Envelope-To
header. - Don’t display remote images.
- Don’t use smart addresses.
- Make default message format plain text.
- Display plain text mails in fixed-width font.
- Remove the Apple rule from the ruleset.
- Install self-signed certificates if your mail servers use them.
- Install SpamSieve.
- Stop Spamsieve from appearing in the doc by setting
LSUIElement
to 0 inSpamSieve/Contents/Info.plist
.
- Stop Spamsieve from appearing in the doc by setting
- Install Mail Act-On.
- Set up act-on rules. (I use a different “archive” rule for each account, all assigned to the same key.)
- Set up shell:
- Generate SSH keypair with
ssh-keygen
. - Upload new public key to commonly-used servers.
- Create local
bin
andman
directories, and any other directories for local tools. -
Add the following to
.profile
:export PATH=$HOME/bin:$HOME/local/bin:$PATH export MANPATH=$HOME/man:$HOME/local/man:$MANPATH export EDITOR='mate -w'
-
Add the following to
.bashrc
:set -o noclobber shopt -s histappend shopt -s histverify shopt -s nocaseglob shopt -s no_empty_cmd_completion shopt -s nocaseglob shopt -s nocasematch shopt -s nullglob set -o ignoreeof FIGNORE=.svn:.DS_Store HISTSIZE=10000 HISTCONTROL=ignoreboth
-
Add the following to
.inputrc
:set show-all-if-ambiguous on set visible-stats on set completion-ignore-case set bell-style none "\e[B": history-search-forward "\e[A": history-search-backward $if Bash "\e[21~": "mc\C-M" Space: magic-space $endif
- Install new version of
rsync
(if that tool will be used).
- Generate SSH keypair with
- Install VPNClient
- Install Git and the git TextMate bundle.
- Install workaround for FileVault Launch Services bug if necessary.
- Install iStat.
-
Make the Help Viewer less obnoxious with the following command:
defaults write com.apple.helpviewer NormalWindow -bool true i=/System/Library/CoreServices/Help\ Viewer.app/Contents/Info.plist sudo defaults write "${i%.plist}" LSUIElement 0 sudo chmod 644 "$i"
-
Make the Dock less ugly with the following command:
defaults write com.apple.dock no-glass -boolean YES
- Install ColorXML for Quick Look previews of XML files.
-
Export UTI definitions for less common file types; I usually put this stuff into TextMate’s Info.plist:
<key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeIdentifier</key> <string>org.tug.tex</string> <key>UTTypeDescription</key> <string>TeX (or LaTeX) source code</string> <key>UTTypeConformsTo</key> <array> <string>public.text</string> <string>public.plain-text</string> </array> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> <string>TEXT</string> <key>public.filename-extension</key> <array> <string>tex</string> <string>latex</string> <string>ltx</string> <string>texi</string> <string>ctx</string> </array> </dict> </dict> <dict> <key>UTTypeIdentifier</key> <string>org.obofoundry.obo</string> <key>UTTypeDescription</key> <string>Open Biologicial Ontologies format</string> <key>UTTypeConformsTo</key> <array> <string>public.text</string> </array> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> <string>TEXT</string> <key>public.filename-extension</key> <array> <string>obo</string> </array> </dict> </dict> <dict> <key>UTTypeIdentifier</key> <string>org.w3.rdf.xml</string> <key>UTTypeDescription</key> <string>RDF data in XML serialization</string> <key>UTTypeConformsTo</key> <array> <string>public.xml</string> </array> <key>UTTypeTagSpecification</key> <dict> <key>public.mime-type</key> <string>application/rdf+xml</string> <key>public.filename-extension</key> <array> <string>rdf</string> </array> </dict> </dict> <dict> <key>UTTypeIdentifier</key> <string>org.w3.owl.rdf</string> <key>UTTypeDescription</key> <string>OWL ontology in RDF/XML serialization</string> <key>UTTypeConformsTo</key> <array> <string>org.w3.rdf.xml</string> </array> <key>UTTypeTagSpecification</key> <dict> <key>public.mime-type</key> <string>application/rdf+xml</string> <key>public.filename-extension</key> <array> <string>owl</string> </array> </dict> </dict> <dict> <key>UTTypeIdentifier</key> <string>org.daml.damloil.rdf</string> <key>UTTypeDescription</key> <string>DAML+OIL ontology in RDF/XML serialization</string> <key>UTTypeConformsTo</key> <array> <string>org.w3.rdf.xml</string> </array> <key>UTTypeTagSpecification</key> <dict> <key>public.mime-type</key> <string>application/rdf+xml</string> <key>public.filename-extension</key> <array> <string>daml</string> </array> </dict> </dict> </array>
- Install Python 3.0 and the Glasgow Haskell Compiler.
- Install Skype.
- Install NetNewsWire.
- Install Things.
- Install Perian.
- Install Firefox, Vidalia, and TorButton for private browsing.
- Install iLife and iWork if necessary.
- Install Graphviz and the AT&T finite state machine library.
- Install other applications, such as OmniGraffle, VLC, VisualHub, Transmission, and Handbrake.
- Finally, copy across all the old documents into home directory. (For me this is only a few gigs of files, so all this “personal” data can just be archived on a memory stick.)
I’m sure the next time I do a fresh install this list will be revised, but this checklist should make a good starting point.