I'm managing multiple computers and want to send out a script that will run in terminal that will add certain applications to the dock. The code I am trying is
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict> <key>file-data</key><dict><key>_CFURLString</key><string>/Macintosh HD/Applications/Google Chrome.app/</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
killall Dock;
I have also tried
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Google Chrome.app/</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
killall Dock;
with and without spaces in between Google Chrome. Thanks for any help in advance.
I'm running Mavericks and this worked for me:
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Google Chrome.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
killall Dock
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With