Remove Finder and Trash icons from the Dock

May 26, '09 07:30:00AM

Contributed by: 0zymandias

I just got into Path Finder (finally) and, like many other Path Finder users, quickly grew annoyed by the useless Finder and Trash icons in the Dock. So, through some digging, I found out how to kill them once and for all (kind of).

Navigate to /System » Library » CoreServices, Control-click on Dock.app then select Show Package Contents from the contextual menu. In the new window that opens, navigate into Resources and open DockMenus.plist in your favorite editor.

Find the entries for finder-quit and trash. In each, change one of the commands so that the command entry is 1004 and the name entry is REMOVE_FROM_DOCK. Save your changes and restart the Dock (killall Dock), and you can then choose Remove From Dock for those two items -- assuming Finder is quit, which Path Finder will do for you.

Unfortunately, it would appear that these entries come back every time the Dock is relaunched, but it beats not being able to remove them at all -- plus, I think this could be easily handled by an AppleScript.

[robg adds: You'll need to do this editing as root (at least in 10.5); I did it in Terminal with sudo vi. Instead of changing an existing entry, I added a new DICT entry for the 1004/REMOVE_FROM_DOCK values in the trash and finder-quit sections. After saving my changes and restarting the Dock, I was able to remove the trash icon via its new Remove from Dock contextual menu entry, so this hint does seem to work as described.

Important note: Making this change in 10.5 will result in breaking code signing for the Dock app. You can confirm this by running this command before and after making the change:

codesign -v /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
I do not know what the implications are of using the Dock with broken code signing, but potentially, it may affect how it works. Proceed at your own risk -- and back up the original DockMenus.plist file before you start, in case you want it back!]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20090523192819542