Loading...

Of Penguins and Daemons 4

By Otaku

OSX Public Beta has finally been released. This will be a fairly practical article that will server to illustrate flexibility of OSX's method of doing just about anything. If you want a review, check out Jason Buck's in depth report.

I know, I know, according to my last article, this one is supposed to have something to do with "builders and makers" but I'll get to that next time, I promise.

First off, you need that lovely little terminal app. It is now located in Applications/Utilities. If I were you, I'd drag it to the dock. Drag Process Viewer to the dock as well.

OSX uses XML files named with the suffix ".plist" to configure most things. This is great because XML files are easy to read and edit with nothing more than a text editor (though things get even easier with a program called Property List Editor which should be available to the general public for download from Apple mid-October).

The Stupidly Large Dock Trick

Folks are always complaining that the Dock takes up too much screen real estate (these are the people who don't realize that you can change its size or auto-hide it) so, just to spite them, let's start with an amusing, totally unproductive modification to the dock. This was originally posted by John Siracusa at Ars Technica, though he made no mention of how to do it.

Open up the file ~/Library/Preferences/com.apple.dock.plist (for those who don't know "~" is unix speak for your home directory) in whatever text editor you like. It's probably easier if you actually open the file from the application, as there probably aren't any programs installed on your computer that are associated with that type of file.

Right after the "dict" tag, you want to insert the following (if it's already there, modify it to the following)

<key>largesize</key>
<real>500</real>
<key>magnification</key>
<true/>

Now run Process Viewer, quit the Dock application by double-clicking on it. It will automatically restart. Now move your mouse over the Dock. The official upper limit of the dock size is 128. To get back to a sane level of magnification, either substitute a value under 128 for that 500, or simply go back in to Dock & Desktop Preferences and adjust the slider.

Changing The Dock's Background

The following trick requires that you be logged in as root.

Pinstripes are nice, but what if you're looking for a change? The open nature of OSX makes that kind of change relatively easy. The global (system-wide) resources for the Dock are located in /System/Library/CoreServices/Dock.app/Contents/Resources

However, to get to this directory with the GUI, you must take a slightly indirect route. "Dock.app" appears just as "Dock" in the GUI. The Finder will tell you it's a application. It lies. Control click on the Dock and select "Show Package Contents". This will open up the inside of the Dock.app directory. Continue to the resources directory from there. Make duplications of the "left", "right" and "middle" pdfs.

Now whip up some new pdfs in the suite of applications you like. I did it in Photoshop, saved it as a pict, then opened the pict up in OSX's Preview told it to Print, clicked the "preview" button and used the "Save as PDF" command. This method doesn't offer much in the way of configurability, however, and you might be better off using Acrobat.

Now all the remains is to replace the "left", "right" and "middle" PDFs with your new ones (hence why we made back-up duplicates earlier). quit the Dock once again. When it restarts, you will see your new settings.

A Handy Troubleshooting Technique

I recently tried to get my DP4 versions of Interface Builder and Project Builder running on OSX Public Beta, however the programs simply wouldn't run. The icon would appear in the dock for a moment and then vanish without a trace. No errors, no nothing.

What's gone wrong? Find out with the Terminal. In the Finder, navigate to the program that is giving you the problem. Then control click on it and select "Show Package Contents". This should open up a new window with a directory called "Contents". In that directory should be another called "MacOS", and finally in that directory is the actual executable. Drag it on to the terminal window to see why it isn't running. In my case, the Builders couldn't find a couple of files (file structure has changed slightly since DP4) I simply copied the needed files to the locations the Builders expected them to be and all was happy.

And So....

There are three tricks to keep you busy for a while. Consider this an introduction to OS X hacking--I expect there will be many more columns written on the subject, both by myself and many others.

Loading...

Site Designed/Edited/Published by Jason Buck and Stephan Jones- Apple, Mac, Macintosh, and Mac OS X are trademarks of Apple. Any other trademarks used are property of their respective owners. Website design and layout © 2010 Jason Buck and Stephan Jones. Content © its respective author(s), published with consent from said author(s). All rights reserved. Neither all or part may be reproduced or distributed without prior consent. Contact Us.