Intermittent problem loading custom dock - default dock takes over

New Contributor

Hello everyone,

We have a policy scoped to our El Capitan computers (both macbooks and iMacs) where the policy first runs a bash script to determine if the user is a Faculty member or a student. If student then the student dock loads, if Faculty, the Faculty dock loads. The plist is delivered via DMG to ~/Library/Preferences/ It is scoped once per computer. Both FET and FUT are checked.

On "some" computers certain local AD accounts get their dock overwritten by the default Apple dock. --OR-- the appropriate dock loads with a few of Apple's default dock items appended to the end.

If anyone has come across this we would be very grateful for any suggestions.

LPS staff


Contributor III

Hi there! You have had this process working normally up until El Cap? 10.11 seems to me to be a little more finicky when it comes to managing preferences by copying .plist files over. If you are running a login script I think you might be running into a few things like your dock.plist being applied before the user account is being created (might give you a default dock) or the plist is copied after the account is created ( would give you a few add ons). If you want more control over your dock using a login script, you may want to look at using dockutil with a short sleep at the beginning to make sure it kicks off after all other login items are done. Another option, have you considered using user config profiles scoped to AD groups to manage this?

Release Candidate Programs Tester

I'd second's dockutil recommendation.

You're fighting against the dock.fixup.plist (which is now SIP protected) & preference caching.

dockutil should work better.

Contributor III

We distribute a default dock via a .dmg file only during the imaging process and works every time! We have done this with Yosemite, El Capitan and now Sierra.

Depending on when the dock gets deployed will depend on whether Apple apps such as Keynote, Pages & Numbers get added to the dock. I have found that if the dock file is deployed after these apps are installed, the dock deploys as expected. If the apps are installed after the .dmg file is deployed, they are added to the dock!

As suggested above, Dockutil is your best bet to deploy dock icons after your Macs are imaged. We use a script for our labs to regenerate the dock on every login. Labs are also in smart groups to allow us to deploy different dock icons for each lab.

You can download Dockutil from here with examples.

Hope this helps!

New Contributor

Thank you everyone for your input. As per your suggestion regarding DockFixUp, I found that by adding "sleep 5" to the login script before installing the dock the desired result was much more consistent and the dock appears to load fairly consistently. Thanks again for your help everyone.