dockutil and Standard User

gskibum
Contributor III

I've been using dockutil successfully with admin users for some time. Now I'm having an issue with standard users.

This command works both with a direct Terminal command and with a script, for admin users:
/usr/local/bin/dockutil --add 'afp://Server_Name/Archives'

I can use it repeatedly just fine.

However with standard users I get the result:

Script result: afp://Server_Name/Archives already exists in dock. Use --replacing 'afp://Server_Name/Archives' to update an existing item
item afp://Server_Name/Archives was not added to Dock

This is regardless of the presence of the shortcut in the dock.

Adding sudo doesn't help.
sudo /usr/local/bin/dockutil --add 'afp://Server_Name/Archives'

Neither does:
sudo /usr/local/bin/dockutil --add 'afp://Server_Name/Archives' --replacing 'afp://Server_Name/Archives'

Is there a trick to getting dockutil to work with standard users?

Thank you!

4 REPLIES 4

CapU
Contributor III

Others swear by this utility, but I couldn't get consistent results with it so I gave up and use the Dock feature in Configuration Profiles. It's a little time intensive, however it works each and every time and easy to add or delete an icon

jaharmi
Contributor

@gskibum, what version of dockutil are you using? I tried it with the current release (v2.0.5) and your exact command worked for a standard user account in Terminal on an OS X 10.11.5 (15F34) VM. After the Dock restarts (it disappears and reappears), a globe icon sits at the end of the Dock, right before the Trash. I did not try it with a script.

It should be similar to the following example in the current "read me" file for dockutil:

dockutil --add vnc://miniserver.local --label 'Mini VNC' --after Downloads --allhomes

If you are planning on adding the same item to all user accounts, you may want to consider and try the --allhomes option, since it is meant for just that purpose.

Of course, I was not able to mount the "Archives" share.

@CapU, I've found dockutil quite reliable but it does pay to keep up with its changes (there have been a number lately, looking at the history) and go through the examples. Of course, I know kcrawford and if I have a problem he usually knows what the issue is. A Dock profile will enforce its Dock settings, so it's not appropriate in all situations — but, of course, is appropriate in some.

jchurch
Contributor II

in mine if its an icon i dont want to add to --allhomes, i add the path to the current users home folder
/usr/local/bin/dockutil --add "/Applications/Launchpad.app" /Users/$3/

gskibum
Contributor III

Thank you all for your input. @jaharmi you did motivate me to update to 2.0.5 but the problem remained. However since it works for you my thoughts found another possible cause: I've been testing with a virtual machine, and sure enough it works fine on real hardware.

I have found another possible bug in dockutil. I can't get it to place icons for Adobe Illustrator CC 2015.3.app or Adobe After Effects CC 2015.app while the rest of the Creative Cloud apps work. I just submitted an issue on the github page for it.