terminal command to lock and unlock the dock?

Hello,


I manage hundreds of iMacs running Yosemite at a school site. I use parental controls with the lock dock feature turned on. I would like to periodically unlock the dock to customize it with new icons, but have not found a terminal command that works, or a streamlined process that is time efficient.


So far I have been individually unlocking the dock in parent controls on each machine, restarting, editing the dock, then re-locking it parental controls, then restarting. This takes 5-10 minutes per machine).


I also tried this command but it didn't work.

defaults write com.apple.dock contents-immutable -bool true; killall Dock;


I also tried cloning the parental controls with an exported plist file to all the machines using ARD, which works for all the parental control settings EXCEPT for the lock dock feature.


Any ideas?


Cheers,

Crystal



iMac, OS X Yosemite (10.10)

Posted on Dec 3, 2014 11:25 AM

Reply
1 reply

Mar 12, 2015 1:40 AM in response to 3d.eastman

Sorry this is probably too late for you, but it may help others seeking this answer, I just had this problem [Mac OS x Yosemite 10.10.2] and found that the following worked for me:


1. Use Terminal to LOCK the Dock by C&P or typing in:


defaults write com.apple.dock contents-immutable -bool true


Then use your preferred method to Log-Out [e.g. Key Combo ⇧⌘Q or [Top Left Menu] then select Log Out “name”]

and then Log-In again.




2. Use Terminal to UNLOCK the Dock by C&P or typing in:


defaults write com.apple.dock contents-immutable -bool false


Then use your preferred method to Log-Out [e.g. Key Combo ⇧⌘Q or [Top Left Menu] then select Log Out “name”]

and then Log-In again.


NB. You will be solely responsible for your actions making changes to the Operating System.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal command to lock and unlock the dock?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.