Add specific apps to the Dock on Mac

expand collapsive

Hey fellow admins! How do you add specific apps to the Dock on your Mac endpoints? Does anyone here use some sort of scripting solution that you’d be willing to share? Thanks.

All Replies

  • Participant

    Aika Patel


    Here’s what we put together to run in our environment:



    LOGGED_USER=stat -f%Su /dev/console

    sudo su $LOGGED_USER -c ‘defaults delete persistent-apps’

    dock_item() {

    printf ‘<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>%s</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>’, “$1”


    # Declare all apps here

    notes=$(dock_item /System/Applications/

    chrome=$(dock_item /Applications/Google\

    mail=$(dock_item /Applications/

    sudo su $LOGGED_USER -c “defaults write persistent-apps -array ‘$notes’ ‘$chrome’ ‘$mail'”

    killall Dock


    The script will detect the currently logged-in user and then customize the dock for that user account.