Lock the Dock in Mac OS X

Feb 8, 2010 - 11 Comments

Dock in OS X

If you need to prevent the Dock icons from changing or being modified on a Mac, you can use defaults command strings to lock down the OS X Dock and prevent any adjustments or changes to how it appears on screen.


To get started, open the Terminal app and then issue the appropriate syntax at the command line, depending on what you’d like to do. Keep in mind these changes are at a user-level. Here’s how to lock down the Dock on any Mac with OS X.

How to Lock the Dock to Prevent Changes to Contents

defaults write com.apple.Dock contents-immutable -bool yes

Lock the Dock to Prevent Changes in Size

defaults write com.apple.Dock size-immutable -bool yes

Lock the Dock’s Position on the Screen

defaults write com.apple.Dock position-immutable -bool yes

After executing any or all of these commands, you’ll want to relaunch the Dock by killing it:

killall Dock

The Dock will reload itself and the changes will be in effect. Your Dock is now locked!

lock mac dock

Why would you want to lock the Mac OS X Dock? If you’re a Systems Administrator or IT Technician, you can make your life a lot easier by having machines stay consistent. One good way to add to consistency across Mac’s is to lock down the Dock to prevent changes in it’s position, keep the contents in place, and to ensure that the size is the same. Now when you’re trying to remotely describe to someone how to open an application, you can be sure it is located exactly where you left it in the Dock.

.

Related articles:

Posted by: Bill Ellis in Command Line, How to, Mac OS, Tips & Tricks

11 Comments

» Comments RSS Feed

  1. Joey K says:

    I work for a school district and I would like to be able to lock down the dock using these scripts for the computers in the lab, can this be done using these scripts using ARD so that I can hit all the machines at once with it?

  2. akcrono says:

    Position lock does not work. Dock will still move to screen 2.

  3. Nick says:

    Works on 10.8.5….locking out my little students from changing the dock! HAHAHA

  4. Hannes says:

    I wrote a little App LockDock (should work on >=10.4 ?), which uses those commands to lock or unlock the dock.

    http://oudkraut.blogspot.com/2012/02/lockdock.html

    It asks for admin priveleges first.

  5. Jamie says:

    The dock position locking works to remove the options from the System Preferences, however the options from Apple menu (Apple > Dock > Position on Left/Bottom/Right) still work. Is there a way around this so I can completely lock the position?

  6. Eric says:

    Does this lock the dock for all users? Or just the current user? If this is for all users, is there a way to do it just for a single user?

  7. Phil says:

    How would you unlock?
    I have run defaults write com.apple.Dock contents-immutable -bool no (followed by killall Dock) and also defaults write com.apple.Dock contents-immutable -bool false (followed by killall Dock) but to no avail.
    Any suggestions?

  8. MacGeeky says:

    I would recommend using Secrets – this is a tool with a GUI for hacks like this and a lot of others.

    Download Secrets from: http://secrets.blacktree.com/

    In the Secrets windows, go to the Dock category and mark the box pointed to in this screenshot: http://drp.ly/mKtdU

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site