Icon

Killing the Undead

How to get rid of Jaguar's Dock

About a year ago, I wrote up a little how-to entitled "Ding Dong, the Dock is Dead," in which I showed several measures you could take to make OS X (then at version 10.1) look and act more like the "Classic" Mac OS 9. OS X certainly has evolved since then, and as I've gotten more comfortable with how things work, I've abandoned some of the little apps that made OS X a tad more Classic-esque. However, one holdover has been my continuing desire to kill the Dock completely in favor of the combination of DragThing's process menu and Keyboard Maestro's program switcher, but after the release of Jaguar, I haven't been able to permanently kill the Dock without things going all haywire. Until now.

The Problem

Apple oh-so-kindly decided to force the issue of what amounts to mandatory Dock usage when they introduced Jaguar last summer, which was pretty much the only nit I had with Apple's otherwise way-cool OS upgrade. There were a couple of problems that forced me into using the Dock, despite my desire to, well, not. The first is that OS X stopped letting other programs intercept the Command-Tab key combination, meaning that you either had to just deal with the Dock as your program switcher, or somehow go against years of mindless rat-in-the-maze training and try to get used to another key combination (such as Option-Tab). As I used to say ceaselessly in junior high, that was a pretty sucky thing Apple did there. I tend to think of myself as relatively adaptable to new ways of doing things, but for some reason, I just couldn't get used to using anything other than Command-Tab, so the Dock became my program switcher by default.

Problem two arose when I tried my usual method of Dockicide, which was using the Terminal and root access to rename Dock.app to something else, and then placing DragThing into the Login Items Preference Pane to replace the functionality the Dock used to provide. Well, Jaguar's Dock doesn't take too kindly to that approach. Apparently, Apple decided to make a usable Desktop a function of the Dock rather than the Finder in 10.2, meaning that if there's no Dock, then there's no way to interact with the Desktop either. Having no Desktop wasn't really an option, so I gave in and resigned myself to the fact that Apple had won this round and that the Dock was going to be a part of my Jaguar experience, like it or not.

The Solution

There wasn't a real "Eureka" moment in finding a way around using Jaguar's Dock -- just a couple behavioral observations over the course of a few months led me to give my old Dock killing hobby another shot, which I really owe to messing around with Unsanity's free Haxie, ClearDock. When you apply a setting in ClearDock, it has to restart the Dock in order to have the changes take effect. After watching that process about 200 times, I made the connection that the Desktop remained active while the Dock wasn't. Hmm...that sure started the ball rolling.

Well then, I said to myself, I can just write me a little AppleScript I can run to force quit the Dock. After all, the Dock is a just another program, so I figured firing up the Script Editor and typing in the following would cure all my woes:

I ran the script, and sure enough, the Dock quit. Woo hoo! Then, like the undead imp from the Hellmouth it is, the evil, evil Dock re-spawned itself. D'oh! Well, all was not lost. At least I had a nice little script that could use to force quit the Dock in case I ever needed it, so I decided to save the script out of the Script Editor as an application. (That's a hint, by the way. You might want to do the same thing.) But damned if that ball didn't keep-a-rollin'. Why would the Dock relaunch itself after a force quit? Is OS X somehow looking to restart the Dock automatically if it notices that it's not active? Would moving the Dock to another location fool OS X into thinking that it's not there and give up?

As much as I'd love to get into all the gory details of how, over the course of several hours and just as many caffeinated beverages, I applied my scary genius to solve a problem that most people probably would have been able to figure out in a minute or two, but alas, I'll just skip right to the system I worked out that got me back to the promised land. First, if you didn't take my earlier hint about making a Quit Dock AppleScript application, open up Script Editor (Applications:AppleScript:ScriptEditor.app), type in the script I mentioned back there, then choose File:Save As and save the file in application format somewhere on your system. I named mine "Kill Dock," saved it in the Applications folder (fig. 2), and added a nice skull icon I grabbed from MM Icons. By all means, feel free to go nuts here and let your creativity run wild with what you name yours and where you choose to save it. This is, after all, a site for creative professionals.


Figure 2

Next, we're going to have some fun in the Terminal. Now, if the dreaded T word sends you into a complete panic, let me explain what we need to do first. The Dock "lives" in the System:Library:CoreServices folder on your boot disk, which is a folder that, by default, had been made mess-proof for your protection. Therefore, we're going to need the power of root access in the Terminal to move the Dock out of there. "Whoa there, Skippy," as I'm sure you're now saying, "just what in the name of tarnation do we need to move the Dock for?" Glad you asked. It turns out that if the Dock isn't where it's supposed to be, OS X won't be able to find it and, by extension, won't be able to restart it when it quits. But we DO need the Dock to start at least once, or else the Desktop is rendered useless. So we need to use the Terminal to move the Dock to the Applications folder. If you've already enabled root access, you can skip ahead. For those that have never wielded the awesome power of the superuser, I now offer my usual disclaimer that root access can really screw up your system, so don't blame me if you do something wrong, yadda yadda yadda. Fire up the Terminal (Applications:Utilities:Terminal), and at the command prompt, enter the following:

% sudo passwd root

You'll get another warning for good measure, and then enter your password twice to gain root access. Now to move the Dock. In the Terminal, type in the following:

% sudo mv /System/Library/CoreServices/Dock.app /Applications/Dock.app

Enter your password, and that's all there is to it! The Dock should now be just another app in your Applications Directory (fig. 3). If you ever want to move it back, enter this in the Terminal:

% sudo mv /Applications/Dock.app /System/Library/CoreServices/Dock.app


Figure 3

Everything should be back to normal after that.

The next step is to place a pointer to the Dock in your Login Items Preference Pane, so it will launch when you first log in to your machine and allow the Desktop to become active. So open up the System Preferences, click Login Items, click Add, then navigate to the Dock program (remember that it's now in your Applications directory). Once it's there in your Login Items, drag it to the top of the list so it launches first. Danger, Will Robinson! If you have other user accounts on your machine, you're going to have to instruct them to add the Dock application to their Login Items panel as well, or else they might get a little peeved at you for giving them the proverbial middle finger when you moved the Dock and took away Desktop access. You may also want to add your Dock replacement program to the Login Items, so that will start automatically as well. The last step is to add the Kill Dock program we made earlier as the last item in the Login Items panel, so it allows enough time for the Dock to launch before killing it (fig. 4).


Figure 4

That's it! We've managed to find a wooden stake for Jaguar's Dock, you still have access to your Desktop, and any third-party program switcher will work using Command-Tab (fig. 5). So now I'm back to having my happy OS X setup from before. That is, until 10.3 comes out...


Figure 5

^ Top of Page

Got Feedback? to send an email. I'll do my best to answer. Really.