Mac OS X represents a radical shift compared to previous incarnations of the Mac OS. The old engine of Apple’s proprietary operating system has been exchanged for an open source Unix OS, the Free-BSD-based Darwin, over which Apple has built a Mac-like interface using a number of innovative technologies.
For the first time, Mac users have an OS that provides a true multitasking and protected memory environment, with a core than gives the user unprecedented power over the running of the system. To the end-users this means that their Mac will, for the first time, happily let them switch from one application to another at any time and that if an application crashes the rest of the system is usually unaffected. In addition to the new OS and new interface Apple has added new i-apps into the pot: iTunes, iPhoto, iMovie, iDVD, iChat andiCal, to name a few, with first four now bundled and promoted as iLife. Of course, being Unix-based, huge amounts of Unix open source software has also become available for the Mac.
So, while there are die-hard Mac OS stalwarts who refuse to upgrade from Mac OS 9 (or even earlier), most Mac users have eagerly embraced the new version of the Mac OS with all the advantages it brings. Unfortunately, old tricks that used to work on earlier Mac OS versions are now obsolete, as are some old Unix tricks which aren’t compatible with Darwin.
In a situation like this one needs a guide to the useful, and sometimes just plain nifty, tricks and hacks that can be performed on the new OS. Mac OS X Hacks provides its 100 hacks grouped into nine topics: Files, Startup, Multimedia and the iApps, The User Interface,Unix and the Terminal, Networking, Email, The Web, and Databases. Not all hacks are created equal, however, and they have been graded into three categories based on their technical complexity: Beginner, Intermediate, and Expert.
Given the distribution of hacks over the three rating categories, 43 Beginner, 29 Intermediate and 28 Expert, one might feel that the words “industrial-strength” in the subtitle refer to light industry.That’s a little unfair, perhaps, as some of the hacks I have found most useful have a Beginner rating while most of the hacks that I doubt I’ll ever use (too esoteric) have an Expert rating.
The Beginner hacks may be technically simple but many of them give answers to the kind of questions that would otherwise have me tearing my hair out trying to find an answer. A good few hacks from Chapter 1, including Hack #1 “Understanding and Hacking your User Account” and Hack #11 “Inspecting the Contents of an .app Package” fell into that category for me. I’d find it hard to say that any of the Beginner rated hacks are really useless or trivial.
Intermediate and Expert level hacks held much more interest, and I was very grateful for the SSH tunneling walk-through in Hacks #70"Secure Tunnelling with VPN” and #71 “Remotely Log In to AnotherMachine with SSH”. Having used Unix extensively many years ago, one of the first hacks I read was #56 “Top 10 Mac OS X Tips for UnixGeeks” which told me my Unix experience is still, happily, relevant.
Some of the Expert hacks may be non-trivial but I wonder how useful they are. Hack #65 “Running Linux on an iBook”, is more of a curiosity item than something many Mac-users will follow. Indeed, if your iBook ran Linux, you wouldn’t have any use for the rest of the book. More useful, but likely to have a restricted audience, are the the two hacks which comprise Chapter 9 on how to install the MySQL and PostgreSQL database software. Similarly, the Hack #82 “Getting sendmail up and running” and Hacks #88 to #98 on how to activate and configure the Apache web server built into Mac OS X are, I dare say, unlikely to be used by most readers. Nonetheless, I personally find it comforting to know that the information is there, neatly packaged into Hacks, if I need it.
One of the real strengths of this book is the self-contained nature of the hacks. This is not a book which could be comfortably read cover-to-cover; it’s much more interesting to read a hack here and a hack there and much more useful as a reference for those times when you have a specific problem. Indeed, many a time my first impulse was to reach for Mac OS X Hacks when I had a problem and the excellent index is another of this book’s strengths.
Computer books always have the potential to date swiftly, given the pace of change in the computing environment. Mac OS X Hacks has generally steered clear of material which will date quickly, although the tips on iApps in Chapter 3 will probably be the first to show their age. Although I haven’t been using the latest OS upgrade, Mac OSX 10.3 “Panther”, for very long, I’ve found that most of my favourite hacks still work well. Alas that Hack #66 “Anatomy of an InternetShortcut” is already obsolete in Mac OS X 10.2 “Jaguar”: URLs dragged from browsers, etc. to the Desktop are no longer text files with a .url extension, as described in the hack, they are resource-fork-only files and the URL is editable only with a resource editor.
Old-style Mac files with resource forks, which includes every “Classic” Application, pose a particular problem for Unix tools that don’t recognise resource forks. Such tools will irreparably damage such files and unfortunately, this includes rsync which is detailed in Hack #59 “Mirroring files and Directories with rsync”. A warning about rsync’s incompatibility with resource forks is a grave omission from the book particularly since a resource-fork-aware version, rsyncX, is freely available.
Of less importance, but potentially very annoying, Hack #7 “Locking and Unlocking Files” contains a typographical error in the final command, to unlock the file you use a lower-case ‘L’: SetFile -a l filename.txt
Despite these few blemishes, I’ve been impressed with Mac OS X Hacks not only for its utility, which has undoubtedly saved me from premature baldness, but for the entertainment provided by the unabashed geeks-having-fun attitude of the various authors. Even though the hacks are written by many different people, the style of writing is always clear and it never reads like a manual; it’s more like a weblog of interesting Mac OS X snippets organised into sections.
Mac OS X Hacks is written for those Mac users who want to roll up their sleeves and have a bit of fun in the terminal, who have probably already installed the Mac OS X Developer Tools (for those who haven’t, there is Hack #55 “Introducing and Installing the Mac OS X Developer Tools") and who are willing to spend a little time to teach their Mac a new trick. My Mac knows more than a few new tricks now, and I’ve had a few laughs along the way as well as learning a few new tricks myself. What more could I ask?


Mac OS X Hacks by Rael Dornfest, Kevin Hemenway


