Locking the Mac OS X dock

Ever accidentally drag an item off the dock? Ever forget what that was and now it’s killing you that you know you might be missing something important? You would think that you can lock your Dock so that things don’t accidentally get removed. It’s such a simple feature—even Windows has had it forever.

Thanks to a quick article on Brighthub, http://www.brighthub.com/computing/mac-platform/articles/43080.aspx, there’s a couple of commands you can type into Terminal to lock it. I took it a step further and just made them into a couple of aliases for my .bash_profile:

alias docklock='defaults write com.apple.dock contents-immutable -bool true;killall Dock'
alias dockunlock='defaults write com.apple.dock contents-immutable -bool false;killall Dock'

So, to lock your Dock now just open the Terminal application and type: docklock

To unlock, type instead: dockunlock

Simple!

Leave a Reply