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:

  1. Install Mac OS X from DVD.
  2. Create an administrator account and log into it:
    1. Turn off Safari’s “Open safe files after downloading” setting (in the General pane of Safari’s preferences).
    2. Install SSHKeychain
    3. Set time zone in the “Date & Time” preference panel.
    4. Set date format to YYYY-MM-DD in the “International” preference panel.
    5. Install developer tools.
    6. Run Software Update and install all updates.
    7. Change computer name in the “Sharing” preference panel.
    8. Create (non-administrator) user account.
  3. Reboot to finish all updates, and log in under normal user account.
  4. Set date and time formats in the “International” preference panel.
  5. Set Energy Saver, Desktop, and Screen Saver preferences.
  6. Set Dock preferences to automatically hide the dock.
  7. Turn off auto-play of CDs and DVDs in the “CDs & DVDs” preference panel.
  8. Connect to external monitor and adjust settings in “Displays” preference panel.
  9. Pair bluetooth keyboard/mouse, adjust key repeat rate and delay, and set mouse button preferences and speed in “Keyboard & Mouse” preference panel.
  10. Set up printer.
  11. Turn off menubar volume control in “Sound” preference panel.
  12. Remove unwanted cruft from Dock.
  13. Create “Media” directory under /Users/Shared.
  14. 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
  15. Change Safari preferences:
    1. Turn off the “Open safe files after downloading” setting.
    2. Start at a blank page
    3. No bookmark bar
    4. Show status bar
  16. Install TeX tools:
    1. Install TeX using installer.
    2. Install Skim.
      • Set Skim to check for file changes.
  17. Install TextMate
    1. Set license code.
    2. Change filter list.
    3. Set wrap column to 78.
    4. Don’t re-indent.
    5. Set latex bundle to use Skim and
  18. Set Finder to open all text files with TextMate and all PDF files with Skim.
  19. Set up Mail:
    1. Create IMAP accounts.
    2. Delete Apple RSS feed.
    3. Map “Sent” mailboxes.
    4. Show X-Envelope-To header.
    5. Don’t display remote images.
    6. Don’t use smart addresses.
    7. Make default message format plain text.
    8. Display plain text mails in fixed-width font.
    9. Remove the Apple rule from the ruleset.
    10. Install self-signed certificates if your mail servers use them.
    11. Install SpamSieve.
      • Stop Spamsieve from appearing in the doc by setting LSUIElement to 0 in SpamSieve/Contents/Info.plist.
    12. Install Mail Act-On.
      • Set up act-on rules. (I use a different “archive” rule for each account, all assigned to the same key.)
  20. Set up shell:
    1. Generate SSH keypair with ssh-keygen.
    2. Upload new public key to commonly-used servers.
    3. Create local bin and man directories, and any other directories for local tools.
    4. 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'
      5. 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
      6. 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
      7. Install new version of `rsync` (if that tool will be used).
      1. Install VPNClient
      2. Install Git and the git TextMate bundle.
      3. Install workaround for FileVault Launch Services bug if necessary.
      4. Install iStat.
      5. Make the Help Viewer less obnoxious with the following command:

      defaults write NormalWindow -bool true i=/System/Library/CoreServices/Help\ sudo defaults write “${i%.plist}” LSUIElement 0 sudo chmod 644 “$i” 29. Make the Dock less ugly with the following command:

      defaults write no-glass -boolean YES 30. Install ColorXML for Quick Look previews of XML files. 31. Export UTI definitions for less common file types; I usually put this stuff into TextMate’s Info.plist:

      UTExportedTypeDeclarations UTTypeIdentifier org.tug.tex UTTypeDescription TeX (or LaTeX) source code UTTypeConformsTo public.text public.plain-text UTTypeTagSpecification TEXT public.filename-extension tex latex ltx texi ctx UTTypeIdentifier org.obofoundry.obo UTTypeDescription Open Biologicial Ontologies format UTTypeConformsTo public.text UTTypeTagSpecification TEXT public.filename-extension obo UTTypeIdentifier org.w3.rdf.xml UTTypeDescription RDF data in XML serialization UTTypeConformsTo public.xml UTTypeTagSpecification public.mime-type application/rdf+xml public.filename-extension rdf UTTypeIdentifier org.w3.owl.rdf UTTypeDescription OWL ontology in RDF/XML serialization UTTypeConformsTo org.w3.rdf.xml UTTypeTagSpecification public.mime-type application/rdf+xml public.filename-extension owl UTTypeIdentifier org.daml.damloil.rdf UTTypeDescription DAML+OIL ontology in RDF/XML serialization UTTypeConformsTo org.w3.rdf.xml UTTypeTagSpecification public.mime-type application/rdf+xml public.filename-extension daml 25. Install Python 3.0 and the Glasgow Haskell Compiler. 32. Install Skype. 33. Install NetNewsWire. 34. Install Things. 35. Install Perian. 22. Install Firefox, Vidalia, and TorButton for private browsing. 24. Install iLife and iWork if necessary. 26. Install Graphviz and the AT&T finite state machine library. 28. Install other applications, such as OmniGraffle, VLC, VisualHub, Transmission, and Handbrake. 29. 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.