Managing dock items

BealesA
New Contributor

Is there a way to remove the default apple dock items i.e Mail, contacts, calendar etc?
I can't seem to find where to do it - we don't particularly want to use scripts.

17 REPLIES 17

barnesaw
Contributor III

In short, no. Not without some sort of scripting solution.

byrnese
New Contributor III

You could use a Policy to edit the Dock, but depending on your deployment it may be ill-advised. Setting a policy, then pushing it out to existing users will overwrite their existing settings. Most users don't respond well to changing how they interact with their computers. If you are planning to deploy to a lab environment then it shouldn't be an issue for you.

In general, though, scripting is a better option. DockUtil is very easy to use:

https://www.jamf.com/jamf-nation/third-party-products/203/dockutil?view=info

b78b366aa22a46039f4ea49eb4c55656

jmahlman
Valued Contributor

As @barnesaw mentioned, you would have to script it or use a config profile. I've used dockutil and Dock Master in the past for this. Dockutil is great because you can generate dock items on the fly and edit an already existing dock if you want. I made this script for our different types of systems and it worked pretty well in the past.

Dock master is great because it makes either a PKG or a config profile for your dock. The config profile is immutable, so it's great for things like labs and classrooms.

Good luck!

Cornoir
Contributor II

Be aware of the issue I discovered concerning Dock Master online configurator:

https://www.jamf.com/jamf-nation/discussions/28575/online-dock-master-webpage-issue

RJH
Contributor

as @byrnese touched upon, an easy alternative to using any scripting or other tools such as Dock Master or Dockutil is using the built in functionality of JAMF, especially for a base image/initial config.
1. Run JAMF Admin on a vanilla mac with these Dock items present.
2. Add each of the Dock items you want removed from a mac using the ADD DOCK ITEMS. 3. Create a simple policy with a Dock Item payload, but select REMOVE, rather than ADD.

I have this within my build workflow to remove Siri, Mail, iMessage, FaceTime and all other apps not required in the corporate Mac image. Works a treat.

Just_Jack
Contributor

@RJH How did you get the default dock icon removed? I'm not seeing file:///Applications/Mail.app and the location of file:///System/Applications/Mail.app isn't working for me.

RJH
Contributor

@Just_Jack I followed the process I detailed above --> added the mail app into JAMF Admin using ADD DOCK ITEMS. This then shows as file:///Applicationss/Mail.app/ in JAMF Admin. This is then selectable within the Dock Item Payload to remove - and from my experience - works well.
Where is not working for you ?

9277f862442f4d82b9fbf16ee9253f76

Anonymous
Not applicable

Hi @RHJ , I think, there is one slash too much in your path, it should be "file://Applications/Mail.app" intstead of "file:///Applications/Mail.app" :-)

@JustJack:
You can add any Object as a Dock-Item. The easiest way is, to locate the Application by using a terminal. Open a terminal on the client, where the Dock-items are. There will be two directories, .../System/Applications/... and .../Applications. some Applications are stored in /System/Applications and some in /Applications.
for example "Mail.app" will be stored in /System/Applications and Safari.App is stored in /Applications.
You have to add the Applications, you want to modify in JamfPro .
Mail: file://System/Applications/Mail.App
Safari: file://Applications/Mail.app
After adding the Applications you want (go to "Computer Management, Dock Items, to add them), you are able to modify a user's Dock in different ways.
Notice the dropdown menu when you're adding a Dock Item: there are three options to choose when your are adding a Dock-Item: You can classify the object as "File" as "App" or as "Folder" If you are using a policy, the user will be able to modify the Dock, If you are using a configuration profile, the user is not able to modify the Dock.
I use this way (the build in function of JamfPro) to create a complete new Dock for our users. The only Item, I was not able to delete, was the "System Setting" Item. But this is no matter for us.
Hope, this will help.
regards,
NOVELLUS

Just_Jack
Contributor

I've seen a number of ways that the Dock icons can be pathed in Jamf. file://localhost/System/Applications/App%20Store.app/ file:///Applications/Microsoft%20Teams.app/ file:///Applications/System%20Preferences.app/
All work for me.
The issue I'm running into is no matter which way I add the dock icon into Jamf Pro and can't get the default icons, like Mail, Facetime, and Calendar, to be removed. I can add icons like MSOffice. Just having a hard time removing icons.

Hi, 

Did you every found a way to remove them?

 

sdagley
Esteemed Contributor II

@Double_G I am able to remove Mail using a Dock Items payload. The path for the Mail app in my Dock item configuration is file://localhost/Applications/Mail.app/ 

sdagley
Esteemed Contributor II

@Just_Jack Try this form file://Macintosh HD/Applications/Music.app/ (of course that assumes the drive is named Macintosh HD, but if run at setup time that should be ok)

Just_Jack
Contributor

Looks like I might have had corruption in the database?
None of the ideas worked for the dock icons I had for Mail, Contacts, Calendar, etc. I deleted them from Jamf Pro and this time rather than create new ones in Jamf Pro - Computer Management - Dock Items. I created them from Jamf Admin. Using the Add Dock Items. Now The Dock items work. Thanks to all that offered help.

Anonymous
Not applicable

@Just_Jack I remove the Icons that way:
1st create the dock items
2nd create a policy to manage the Dock Items. See the pictures (and the paths from the created dock items)
021c9831a6964c448d58c8212f5f077e

15a479ee502948849d20f13944bf91e8

72369fd091f44e629c774bd9559bb761

larry_barrett
Valued Contributor

There are differences in file paths depending on the installed OS you're trying to manage. I had to have separate policies scoped to Mojave and Catalina.

If you right click the item in question and select Get Info you'll be able to see the path to the file itself. You could also drag the application icon into a terminal window to be sure.

RJH
Contributor

@NOVELLUS The JAMF Admin method I described in my previous posts uses the three slashes "file:///" whereas it appears when you add it in the JSS you only need to specify two slashes, but based on others posts, they are interoperable, and JAMF handles each correctly regardless. I prefer to use the JAMF admin tool, as it handles all the syntax correctly, and also fills the PLIST location, as per attached, without any need for additional effort/typing. Not sure why you weren't able to remove the SysPrefs from the Dock. This works fine, and I have been using for 2-3 years now to customise new users docks, without issue, when done from the JAMF Admin tool.

1376fccb8c0049abb4cb8a67300ba3c3

Anonymous
Not applicable

@RJH: Your're right, I noticed that behavior last time, when I was working with the Jamf Admin-Tool. I believe, between the second and the third slash, "localhost" will be insert. If you write the path "https://localhost/..." the word "localhost" will be deleted and there are three slashes left.