Recently I have been actively looking into the best solution for setting a custom dock on multiple machines.
Apple’s Profile Manager allows the creation of configuration profiles with dock settings. However, the functionality has some frustrating limitations:
There is no control over the order in which applications are displayed in the dock.
You can only add applications to Profile Manager if they are installed (note: can be dummy .app files) on the OS X Server host itself.
No home directory relative path support, therefore you cannot simply add a user’s Downloads folder to the dock.
The Search for Something Better
I tried Kyle Crawford’s dockutil command line tool and found it worked well for changing the dock of existing local accounts, but required scripting (LaunchAgent) to apply to newly created accounts.
I also had temperamental success in directly editing:
/System/Library/CoreServices/Dock.app/Contents/Resources/en.lproj/default.plist
/System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist
After that I tried using Tim Sutton’s mcxToProfile script to convert ~/Library/Preferences/com.apple.dock.plist into a profile. Unfortunately home directory relative folders were broken using this technique.
Get To The Good Stuff
Over the past week I started working on a tool to make generating dock configuration profiles easy and include all the features missing from other tools.
The advantages of my solution (Dock Master) include:
Support for home directory relative paths (e.g. ~/Downloads).
The ability to include applications that are not installed.
Inclusion of network shares and website links with custom labels.
The ability to set folder attributes (sort by, display as and view content as).
Dock Master is an intuitive way to customise and generate dock profiles. To help you get started I have included some sample data commonly featured in education docks and an example of a directory, share and website that can be edited/removed as required. Once all the desired alterations have been made the profile is ready to be downloaded and distributed.
Removable Dock Items
A few people have contacted me asking if there’s way to deploy a custom dock with removable items. Unfortunately, configuration profiles do not allow for this. Dock Master now works around this limitation by creating a dock preference file that is added to the User Template (new user accounts) and optionally replaces the dock plist in existing user accounts.
Below you will notice a lock icon next to each dock item, unlocked items are removable by the end user. If one or more dock items are unlocked, Dock Master generates a tar file (compressed archive) instead of a configuration profile.
Once the tar file (archive) is extracted you will have a folder containing a ‘makepackage.command’ script. To build your custom package, simply right click the script and select Open.
The resulting package can be deployed just like any other package (e.g. Apple Remote Desktop, AutoDMG, DeployStudio, Munki, etc).