Mac App Store Apps - Add to dock

JasonNVSD
New Contributor III

Any suggestions how to add apps to the dock that were installed from the the Mac App Store in Jamf? I'm hoping I don't have to create a separate policy for each app just for the dock...

10 REPLIES 10

WellsJtech
New Contributor III

@JasonNVSD How are you adding apps to your dock now?

JasonNVSD
New Contributor III
How are you adding apps to your dock now?

The "Dock Items" step in the policy that installs the Application.

Hugonaut
Valued Contributor II

Dockutil =)

Just gotta deploy the binary & good to go! - Dockutil GitHub

usage:     dockutil -h
usage:     dockutil --add <path to item> | <url> [--label <label>] [ folder_options ] [ position_options ] [--no-restart] [ plist_location_specification ]
usage:     dockutil --remove <dock item label> | <app bundle id> | all | spacer-tiles [--no-restart] [ plist_location_specification ]
usage:     dockutil --move <dock item label>  position_options [ plist_location_specification ]
usage:     dockutil --find <dock item label> [ plist_location_specification ]
usage:     dockutil --list [ plist_location_specification ]
usage:     dockutil --version

position_options:
  --replacing <dock item label name>                            replaces the item with the given dock label or adds the item to the end if item to replace is not found
  --position [ index_number | beginning | end | middle ]        inserts the item at a fixed position: can be an position by index number or keyword
  --after <dock item label name>                                inserts the item immediately after the given dock label or at the end if the item is not found
  --before <dock item label name>                               inserts the item immediately before the given dock label or at the end if the item is not found
  --section [ apps | others ]                                   specifies whether the item should be added to the apps or others section

plist_location_specifications:
  <path to a specific plist>                                    default is the dock plist for current user
  <path to a home directory>
  --allhomes                                                    attempts to locate all home directories and perform the operation on each of them
  --homeloc                                                     overrides the default /Users location for home directories

folder_options:
  --view [grid|fan|list|auto]                                   stack view option
  --display [folder|stack]                                      how to display a folder's icon
  --sort [name|dateadded|datemodified|datecreated|kind]         sets sorting option for a folder view

Examples:
  The following adds TextEdit.app to the end of the current user's dock:
           dockutil --add /Applications/TextEdit.app

  The following replaces Time Machine with TextEdit.app in the current user's dock:
           dockutil --add /Applications/TextEdit.app --replacing 'Time Machine'

  The following adds TextEdit.app after the item Time Machine in every user's dock on that machine:
           dockutil --add /Applications/TextEdit.app --after 'Time Machine' --allhomes

  The following adds ~/Downloads as a grid stack displayed as a folder for every user's dock on that machine:
           dockutil --add '~/Downloads' --view grid --display folder --allhomes

  The following adds a url dock item after the Downloads dock item for every user's dock on that machine:
           dockutil --add vnc://miniserver.local --label 'Mini VNC' --after Downloads --allhomes

  The following removes System Preferences from every user's dock on that machine:
           dockutil --remove 'System Preferences' --allhomes

  The following moves System Preferences to the second slot on every user's dock on that machine:
           dockutil --move 'System Preferences' --position 2 --allhomes

  The following finds any instance of iTunes in the specified home directory's dock:
           dockutil --find iTunes /Users/jsmith

  The following lists all dock items for all home directories at homeloc in the form: item<tab>path<tab><section>tab<plist>
           dockutil --list --homeloc /Volumes/RAID/Homes --allhomes

  The following adds Firefox after Safari in the Default User Template without restarting the Dock
           dockutil --add /Applications/Firefox.app --after Safari --no-restart '/System/Library/User Template/English.lproj'

  The following adds a spacer tile in the apps section after Mail
           dockutil --add '' --type spacer --section apps --after Mail

  The following removes all spacer tiles
           dockutil --remove spacer-tiles

Notes:
  When specifying a relative path like ~/Documents with the --allhomes option, ~/Documents must be quoted like '~/Documents' to get the item relative to each home
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

JasonNVSD
New Contributor III
Dockutil =)

I've used dockutil before, but I don't understand where in Mac App Store Apps I'd be able to use it.

dmaestre
Release Candidate Programs Tester

Hi,

Just create a standard dock with the apps you want and deploy it. They'll fill in as the applications are installed. You might see a question mark but the app will replace it once installed on the machine.

JasonNVSD
New Contributor III
Just create a standard dock

We don't have a "standard" dock. Different computers have different apps.

Anyway, it sounds like this simply wasn't considered for Mac App Store Apps. I'm surprised since the old way (using Admin/Composer and Policies) worked so well with Dock Items.

claudiogardini
Contributor

Just create a Script like in this example. Scope to a Smart Group which has the App installed for example.

Examples:
  The following adds TextEdit.app to the end of the current user's dock:
           dockutil --add /Applications/TextEdit.app

rhooper
Contributor III

@claudiogardini to be clear, to use this dockutil one needs to create a policy that pushed the dockutil download to each device first then use the script to install the wanted application? In our case, we want to load Chrome and Self Service.
Just want to be sure I am doing it correctly before jumping on the wagon here.

Hugonaut
Valued Contributor II

@rhooper Yes, I guess I wasn't clear enough, it must be deployed with a policy. Path dockutil to a directory (/usr/bin/ for example) by creating a package with composer & then make a script that runs after the package to make it executable.

#!/bin/sh

chmod -x /usr/bin/dockutil
Just gotta deploy the binary & good to go! - Dockutil GitHub
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

JasonNVSD
New Contributor III
Scope to a Smart Group which has the App installed

Even though it's the first one in the list, I never thought of using an Application Title as a Criteria. This still requires having a separate policy for every Mac App Store App, but it's doable.