Deploy Chrome Web App on Dock

jonna1006
Contributor

I saw an old post tried to resolve the issue, but unfortunately no solution was provided.

My organization is based on Google Workspace, and we have to use Gmail, Google Calendar and Chat for work, so I have to manually set up the app shortcut for each user on dock, which is time-consuming, is there anyway we can deploy the app and then add them to dock like other apps via PPPC or Dock Master?

Any suggestion will be appreciated!😊

2 ACCEPTED SOLUTIONS

YanW
Contributor III

I got it working "mostly". It opens as a web page instead of a web app window. Need to work on that. 

Create a dmg with the web app in Composer.

Screen Shot 2022-02-17 at 3.29.24 PM.png

Upload the dmg as FEU to Jamf with the following script. It'll change the user to the current user. 

I use dockutil to dock the Web App. You can use Dock Items. 

#!/bin/sh

currentUser=$(ls -l /dev/console | awk '{print $3}')

/usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/$currentUser/Library/Application\ Support/Google/Chrome/Default/Web\ Applications/_crx_pjkljhegncpnkpknbcohdijeoejaedia" /Users/$currentUser/Applications/Chrome\ Apps.localized/Gmail.app/Contents/Info.plist

exit

 Let me know how it goes, thanks.

View solution in original post

Google Calendar

#!/bin/sh currentUser=$(ls -l /dev/console | awk '{print $3}') /usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/$currentUser/Library/Application\ Support/Google/Chrome/Default/Web\ Applications/_crx_kjbdgfilnfhdoflbpgamdcdgpehopbep" /Users/$currentUser/Applications/Chrome\ Apps.localized/Google\ Calendar.app/Contents/Info.plist exit

 

Google Chat

#!/bin/sh currentUser=$(ls -l /dev/console | awk '{print $3}') /usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/$currentUser/Library/Application\ Support/Google/Chrome/Default/Web\ Applications/_crx_mdpkiolbdkhdjpekfbkbmhigcaggjagi" /Users/$currentUser/Applications/Chrome\ Apps.localized/Google\ Chat.app/Contents/Info.plist exit

 

View solution in original post

15 REPLIES 15

robertliebsch
Contributor

If you have Gmail, Google Calendar, and Chat in your Dock, and you have Jamf Admin.app on your computer, you should be able to capture the dock items and save them to your instance. Then, using a policy with Dock Items you can add the above apps.

Here is Docs and Slides being added
robertliebsch_0-1645121312088.png

 

And now you can add them to a Dock Items Policy 

robertliebsch_1-1645121424642.png

 

But how can you deploy to universal user, as from the screenshot, you are deploying this to a specific user. 

You're right... 
How do you deploy the Chrome Web Apps?
Maybe the shortcuts could be deployed in the /User/Shared directory somewhere. Then the reference point that the Dock Items policy would be universal...

That will not work because web apps are set to that user. It's in user's applications folder. 

Screen Shot 2022-02-17 at 2.06.07 PM.png

You might be able to do that if you can figure out how to change the $currentUser on the Info.plist

defaults read /Users/$currentUser/Applications/Chrome\ Apps.localized/Gmail.app/Contents/Info.plist CrAppModeUserDataDir

YanW
Contributor III

I got it working "mostly". It opens as a web page instead of a web app window. Need to work on that. 

Create a dmg with the web app in Composer.

Screen Shot 2022-02-17 at 3.29.24 PM.png

Upload the dmg as FEU to Jamf with the following script. It'll change the user to the current user. 

I use dockutil to dock the Web App. You can use Dock Items. 

#!/bin/sh

currentUser=$(ls -l /dev/console | awk '{print $3}')

/usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/$currentUser/Library/Application\ Support/Google/Chrome/Default/Web\ Applications/_crx_pjkljhegncpnkpknbcohdijeoejaedia" /Users/$currentUser/Applications/Chrome\ Apps.localized/Gmail.app/Contents/Info.plist

exit

 Let me know how it goes, thanks.

Above solution is amazing, everything works!!

I am using Dock Master to setup doc, do you know how to set up the path of the application? Can you provide an example/screenshot?

Really appreciate!!!😀

YanW
Contributor III

I think this is the path

/Users/username/Applications/Chrome Apps.localized/Gmail.app

on my dockutil, I have this

sudo -u "$currentUser" $dockutil --add '~/Applications/Chrome Apps.localized/Gmail.app' --no-restart

 

For Dock Master, below path works:

~/Applications/Chrome Apps.localized/Gmail.app

The above script only works for Gmail app, can you advise how to deal with Google Chat and Google Calendar? I could not find the crx id for Chat and Calendar anywhere...

Google Calendar

#!/bin/sh currentUser=$(ls -l /dev/console | awk '{print $3}') /usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/$currentUser/Library/Application\ Support/Google/Chrome/Default/Web\ Applications/_crx_kjbdgfilnfhdoflbpgamdcdgpehopbep" /Users/$currentUser/Applications/Chrome\ Apps.localized/Google\ Calendar.app/Contents/Info.plist exit

 

Google Chat

#!/bin/sh currentUser=$(ls -l /dev/console | awk '{print $3}') /usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/$currentUser/Library/Application\ Support/Google/Chrome/Default/Web\ Applications/_crx_mdpkiolbdkhdjpekfbkbmhigcaggjagi" /Users/$currentUser/Applications/Chrome\ Apps.localized/Google\ Chat.app/Contents/Info.plist exit

 

Hi @jonna1006 Did this work for you to have them as standalone apps? For me they keep opening tabs of an existing window.

Unfortunately, I realize this method is no longer working, it is only open a tab inside Chrome.

Arul
New Contributor II

Hi, 
Do we have any alternate option to fix this