Remotely configuring a user's dock
Here are some commands that worked in ARD's *Send UNIX Command* to replace the entire dock with specific apps and also folders. +Each of the commands consist of one line followed by a return.+ I've broken them up for clarity:
The following two lines delete the current Dock apps and folders; don't use them if you're just adding items to the current Dock
*defaults delete com.apple.dock persistent-apps*
*defaults delete com.apple.dock persistent-others*
• Add Safari
*defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</k ey>*
<string>/Applications/Safari.app</string><key>_CFURLStringType</key>
<integer>0</integer></dict></dict></dict>'
• Add MS Word (note the lack of .app suffix)
*defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</k ey>*
*<string>/Applications/Microsoft Office X/Microsoft Word</string><key>_CFURLStringType</key>*
<integer>0</integer></dict></dict></dict>'
• Add a folder
*defaults write com.apple.dock persistent-others -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</k ey>*
*<string>/Applications (Mac OS 9)/Educational</string>*
<key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
• And finally restart the Dock
*killall -HUP Dock*
In ARD I ran the *Send UNIX Command* with +Run command as User: Student+ since that was the user whose Dock was being changed.
One could as well direct the *defaults write* command to /Users/ yourusersname/Library/Preferences/com.apple.dock and run the command as a different user.
G5 iMac, Mac OS X (10.3.x)