Dockutil

If you use Mac OS 10.5 and like to customize your user interface, you need dockutil, if for no other reason than that it lets you put items of any type on either side of the Dock.

Allow me to elaborate on that last point. I own a student copy of MATLAB, which is reasonably good math software, and now and again I need it for my homework. The one point about MATLAB that I hate with burning passion: They built an essentially cross-platform interactive command-line program and then, here's the bad part, hacked on a user interface at the end using Java. This not only makes the UI look bad and respond sluggishly on all platforms, but it doesn't even run on my Leopard-Intel machine. Why? It assumes/requires/tries to launch an old PPC build of the JVM, which naturally doesn't work right on my system. Luckily, the program itself is really a CLI, so I can still run it from the terminal. Trouble is, the executable itself wasn't intended to be run directly by the user, so it's buried deeply inside the application folder, and doesn't work if moved out of its comfortable directory structure. This sounds like a job for the Dock, right? That way, I can have an alias to the program at the bottom of my screen, ready to be run with a single click.

The trouble is, the Dock thinks only application bundles deserve to inhabit the exclusive left section. I was on the point of trying to use Platypus to create an application bundle wrapper to call the MATLAB executable when I stumbled on dockutil. Despite being only a humble command-line program itself, dockutil, can do quite a lot. Buried in the screenful (literally, unless you have a pretty fancy large screen) of options is "--section" which instructs dockutil which side of the dock to add an item on. I just did:

dockutil --add /Applications/MATLAB_SV701/bin/matlab --section apps

and there was MATLAB, hobnobbing with all the cool apps over on the left side of the divider. It still has the ugly terminal prompt icon, but a single click starts it up, just like I wanted. (Also since it's in the Dock, Quicksilver sees it without needing an extra file scanner over the /Applications/MATLAB_SV701/bin/ directory.)

Dockutil will also allow you to do things like put an application on the right side of the Dock, but I wouldn't recommend that particular example. For one thing, you might as well just keep putting applications in the space already intended for them, and for another the Dock will likely not do what you want with any application bundles placed on the right side, showing their contents when clicked, as they are, after all, folders. Impeccable though the logic is, you more likely have the application in your Dock because you want to run it, so I'd stick with putting it on the left if I were you.

No Comments

Comment on this post