Creating a plist for the dock

aporzio1
New Contributor II

I have created a plist to set the default dock but the items that I have added can not be removed. I can add and remove other items, but the initial items that I added seem persistent. What do i need to add to make it full customizable after initial set up?

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>autohide</key> <false/> <key>contents-immutable</key> <false/> <key>largesize</key> <integer>128</integer> <key>launchanim</key> <true/> <key>launchanim-immutable</key> <false/> <key>magnification</key> <false/> <key>magnify-immutable</key> <false/> <key>magsize-immutable</key> <false/> <key>mineffect</key> <string>genie</string> <key>mineffect-immutable</key> <false/> <key>minimize-to-application</key> <false/> <key>minimize-to-application-immutable</key> <false/> <key>orientation</key> <string>bottom</string> <key>position-immutable</key> <false/> <key>show-process-indicators</key> <true/> <key>show-process-indicators-immutable</key> <false/> <key>size-immutable</key> <false/> <key>static-apps</key> <array> <dict> <key>tile-data</key> <dict> <key>file-data</key> <dict> <key>_CFURLString</key> <string>/Applications/Launchpad.app</string> <key>_CFURLStringType</key> <integer>0</integer> </dict> </dict> <key>tile-type</key> <string>file-tile</string> </dict> <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> <key>tile-type</key> <string>file-tile</string> </dict> <dict> <key>tile-data</key> <dict> <key>file-data</key> <dict> <key>_CFURLString</key> <string>/Applications/Firefox.app</string> <key>_CFURLStringType</key> <integer>0</integer> </dict> </dict> <key>tile-type</key> <string>file-tile</string> </dict> <dict> <key>tile-data</key> <dict> <key>file-data</key> <dict> <key>_CFURLString</key> <string>/Applications/Safari.app</string> <key>_CFURLStringType</key> <integer>0</integer> </dict> </dict> <key>tile-type</key> <string>file-tile</string> </dict> <dict> <key>tile-data</key> <dict> <key>file-data</key> <dict> <key>_CFURLString</key> <string>/Applications/Notes.app</string> <key>_CFURLStringType</key> <integer>0</integer> </dict> </dict> <key>tile-type</key> <string>file-tile</string> </dict> <dict> <key>tile-data</key> <dict> <key>file-data</key> <dict> <key>_CFURLString</key> <string>/Applications/System Preferences.app</string> <key>_CFURLStringType</key> <integer>0</integer> </dict> </dict> <key>tile-type</key> <string>file-tile</string> </dict> </array> <key>static-others</key> <array> <dict> <key>tile-data</key> <dict> <key>arrangement</key> <integer>2</integer> <key>displayas</key> <integer>2</integer> <key>home directory relative</key> <string>~/Downloads</string> <key>label</key> <string>Downloads</string> <key>showas</key> <integer>1</integer> </dict> <key>tile-type</key> <string>directory-tile</string> </dict> </array> <key>tilesize</key> <integer>68</integer> <key>version</key> <integer>1</integer> </dict> </plist>
6 REPLIES 6

jefff
Contributor II

Rather than building your dock plist from scratch, you might try building it with the excellent Dockmaster profile maker. I know that it has an option that addresses that very issue.

sdagley
Esteemed Contributor II

@aporzio1 For scripted control of Dock contents you can also try dockutil (and see the thread Anyone able to get dockutil working with 10.12 Sierra? regarding its use). Configuration Profiles are more intended to set things you don't want changed rather than just providing initial settings.

aporzio1
New Contributor II

@jefff That is actually where i created this plist, but i had the option unchecked, so it should be able to be changed. I am not sure why it will not let me

@sdagley to use dockutil it would need to also be installed on the target computer, correct? I am looking for a solution that will work with no pre-reqs. What I made is a bash script that writes the plist above and then restart the dock.

sdagley
Esteemed Contributor II

@aporzio1 dockutil is 687 lines of Python, so it's pretty low impact to deploy to all of your managed machines (say in /usr/local/yourcompanynamehere/). For as much as dockutil simplifies dock manipulation, the slight extra effort to deploy it is well worth it (IMO).

aporzio1
New Contributor II

@sdagley the systems that this will be going to are not managed systems, otherwise that would have been a great solution. That is why I am looking to just create the plist manually and run a bash script locally.

sdagley
Esteemed Contributor II

@aporzio1 Sorry, it wasn't clear in your original post that you were trying to do something to systems that weren't managed with Jamf Pro. You can still utilize dockutil in a standalone bash script by embedding dockutil in your bash script and using cat to write it out on the target machine so it can be called from the bash script. Here's an example of how to do that: https://www.jamf.com/jamf-nation/discussions/27679/creating-a-plist-with-a-script-having-problems-ca...