The Dock in OS X is meant to be easily configurable, where you can simply drag items to and from it, or resize and position it to organize and manage it according to your needs. However, there may be times when you need to set up a Dock for another user, which may be more significant for a Mac being used in a school, business, or other multi-user environment, and especially true for one which you are managing remotely.
If you have access to the user’s account, then you can do this easily by logging on and adjusting Dock settings, but if not then you can configure the Dock for a user in the following way from a dedicated administrative account.
Assuming you already have an admin account on the local system that you are logging into for remote access, you can use this one to create a Dock configuration; however, doing so will change your Dock’s configuration. Therefore create a new user account from which to work in the Users & Groups system preferences, make it administrative, and then log into it using the Fast User Switching menu (enable in the Login Options settings below the list of users in the Users & Groups preferences)..
2. Transfer the target account’s dock configuration to your new account
When logged into the new admin account, open the Terminal and run the following command, changing USERNAME to be that of the targeted user account:
sudo cp /Users/USERNAME/Library/Preferences/com.apple.dock.plist ~/Library/Preferences/;killall Dock
After doing this, your Dock will disappear and reappear with the configuration of the user’s Dock. If you cannot modify the Dock at all, then run the following command and try again:
sudo chown `id -un` ~/Library/Preferences/com.apple.dock.plist
3. Configure the Dock according to your (or the other user’s) wishes. This will update your current account’s Dock settings file accordingly, and you can now copy it back to the target user’s account.
4. Back up the user’s current Dock settings with the following command, remembering to change USERNAME to the short name of the target account:
sudo cp /Users/USERNAME/Library/com.apple.dock.plist /Users/USERNAME/Library/com.apple.dock.plist.bak
Note that once backed up, you can restore the user’s backup with the following command:
sudo cp /Users/USERNAME/Library/com.apple.dock.plist.bak /Users/USERNAME/Library/com.apple.dock.plist; killall -u USERNAME -c Dock
3. Copy your modified Dock configuration to the new user’s library
sudo cp ~/Library/com.apple.dock.plist /Users/USERNAME/Library/com.apple.dock.plist
5. change ownership on the file so the target user has access
sudo chown USERNAME /Users/USERNAME/Library/com.apple.dock.plist
6. Re-launch the user’s Dock
You can use Activity Monitor to locate the Dock process running in the target user’s account, and then select and force quit it; however, the following command should accomplish the same thing:
killall -u USERNAME -c Dock
When you do this, the Dock will disappear and then reappear for the user, loading then new configuration you made for it.
Talking about the Mac Dock, is there a way to include folders on the left side (Applications) of the Dock?
Such folders-subfolders could contain aliases of applications or folders of applications. Much as could be done with Mac OS 9 Apple menu using aliases.
That would be very convenient to access applications and folders containing groups of applications when you have hundreds of them if not thousands (leaving them all in the first level of the Applications folder would be a mess).
Thank-you. You left out the Preferences part of the path in some of the commands.