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:
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).
Do You Like Dock Master?
If you appreciate my work on Dock Master please consider making a donation. Dock Master has been a hobby project, I never developed it planning to make money (although my partner thinks I should) and I felt it was my way of contributing to the Mac Admin community. Donations help offset server hosting costs and access to resources.
I have downloaded my fancy dock profile/package, how do I push it out to all my users?
There are several ways to distribute profiles and packages, I recommend simply importing them straight into Munki.
What happens if I want to change a Dock Master profile already installed on my clients?
Dock Master profiles use the dock name as the profile identifier, therefore if you use the same name the new dock profile will overwrite the old. Dock Master packages simply overwrite any prior installed Dock Master package.
Can I reorder dock items?
Yes, simply click and drag the ≡ sign to change the position of a dock item.
I still don’t get it, why would I use this?
In education environments younger students find it difficult to find an application in Finder or the Launchpad, therefore having applications sitting in the dock allows students to independently access the applications they need.
This tool allows advanced customisation and quick generation of dock profiles that can be applied to different device groups (e.g. Art, Music, Junior School Macs).
And lastly because it's awesome!
Where can I find the source code?
I was surprised with the demand for Dock Master. Since its release I have rewritten Dock Master (originally PHP) into a native OS X Swift command-line tool for offline use. You can find the source code on GitHub here.