Dan Wood: The Eponymous Weblog

Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his weblog, which mostly covers geeky topics like Macs and Mac Programming.

Useful Tidbits and Egotistical Musings from Dan Wood

Categories: Mac OS X · Cocoa Programming · General · All Categories

Thu, 17 Mar 2005

Being a developer, one thing that I need to do more than the average user (I hope) is to re-install the operating system. As a new major operating system version gets close to release (e.g Tiger, which is supposedly due any time between two weeks and three months from now), I find myself installing the new builds every week or two. And let me tell you: it's really tedious.

Over the years, I've built up a document that I refer to (and modify as needed) every time I do an installation. It takes about a half an hour after I get the operating system installed to where I can actually get back to work!

The main reason that this is so tedious is that there are so many applications and extensions that I use that are (by default at least) installed on top of the operating system, as opposed to in my account. And that a lot of tweaks require editing the system files, which of course get rewritten when I do a fresh installation.

Another thing which makes this tedious is that so many items need to be installed from the user interface, as opposed to from the command line. And even if they could be installed from the command line, it would take a lot of work to figure out how to "convert" those operations — which are easy to do with the mouse — to a script.


Here is my current "to do each installation" list, edited a bit for brevity and clarity, plus lots of commentary.

  • Install the OS. (I tend to do clean installations, which is often a requirement if doing developer builds. Since I keep my home directory on a different partition, I don't have to worry about copying any useful data off of the system volume first, which saves a lot of hassle.) Customize the installation so that it doesn't install the unnecessary (for me) Asian fonts, printer drivers, and language packages. Create an initial "Admin" user, and quit (command-Q) when the installer ask me to register with them.
  • Install the developer tools that come with the operating system. (Useful since I'm a developer!) Customize the installation to avoid the packages I don't need, like Java development.
  • Launch the terminal (keeping it in the dock for easy future access), and remove the developer packages that I know I will not need. I paste in the following lines. (I'm considering finding more files at some point to reduce the clutter even more.)
    sudo find /Library/Application\ Support/Apple/Developer\ Tools -name '*Java*' -exec rm -rf {} \;
    sudo find /Library/Application\ Support/Apple/Developer\ Tools -name '*Sherlock*' -exec rm -rf {} \;
    
  • Install from a bunch of installer packages. I try to keep these installer package files around on a separate hard drive partition so they are easy to get to, or check their web sites to see if there is a new version I can install:
    • Subversion installer package
    • Classic Support, from the CPU_Classic.pkg file (from the "additional software" CD)
    • Peripheral Vision; I keep the registration code handy so I can register it right away
    • The driver for my Kyocera Mita printer (which I love!)
    • Stuffit Expander (which I don't use much anymore, but Path Finder seems to need this to be installed)
    • UnitKit, which I use for software testing
    • iWork and iLife from the DVDs (though I'm thinking of copying these applications over to another partition so that I don't have to keep installing them)
  • Now that all the Apple software is installed, I run Software Update to make sure that I have all the latest updates.
  • Run the Printer Setup utility to set up my printer
  • Some Apache configuration which I won't bore you with
  • Run System Preferences, and set up:
    • Mouse tracking speed
    • Add more user accounts: my main account (which doesn't have administrator privileges, which I prefer to make it harder to clobber system files, and since I want to make sure that the applications I write will work for a non-administrator user) and a "tester" account.
    • Sharing: Rename computer from its default name, turn on file sharing, web sharing, etc. Turn on firewall, then open up appropriate ports for Rendezvous/Bonjour sharing, iChat (5060,16384-16403, 17421), SubEthaEdit (30729).
    • Network: Set up my configurations
    • Date/Time: turn on network time server
    • QuickTime: Set up my connection speed and enter my QT Pro information
  • Set up some information in the login window in case the computer is stolen and recovered; this involves editing /Library/Preferences/com.apple.loginwindow.plist and adding a string for the key "LoginwindowText"
  • In the terminal, add my main account the the sudo'ers list. Also, set up a soft-link to where my user account really lives, on a separate partition.

Well, there are a few more steps that I need to go through once I'm logged into my main account, but you get the idea. The point is that I'm sure a lot of this could be avoided by allowing many packages and configurations to be installed in a location that isn't clobbered when you install a new operating system. Having an easy way to collect up all the changes that were applied so that they can be re-applied later using a script would be nice, too. Of course, I don't want to spend days and days working on techniques to save me half an hour every few weeks. But if Apple could come up with a way to streamline system setup process, I'm sure we'd all benefit!

If any readers have their own techniques for making a new installation a streamlined process, I'd love to hear about them in the comments.