Skip to main content
Solved

Deploy Chrome Web App on Dock


jonna1006
Forum|alt.badge.img+7

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!😊

Best answer by YanW

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.

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 original
Did this topic help you find an answer to your question?

15 replies

Forum|alt.badge.img+5

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.


Forum|alt.badge.img+5
robertliebsch wrote:

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

 


Forum|alt.badge.img+5
robertliebsch wrote:

Here is Docs and Slides being added

 


And now you can add them to a Dock Items Policy 

 


jonna1006
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 35 replies
  • February 17, 2022
robertliebsch wrote:

And now you can add them to a Dock Items Policy 

 


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


YanW
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • February 17, 2022
robertliebsch wrote:

And now you can add them to a Dock Items Policy 

 


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

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


Forum|alt.badge.img+5
jonna1006 wrote:

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...


YanW
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • Answer
  • February 17, 2022

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.

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.


jonna1006
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 35 replies
  • February 17, 2022
YanW wrote:

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.

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
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • February 17, 2022
jonna1006 wrote:

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!!! 😀


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

 


jonna1006
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 35 replies
  • February 17, 2022
YanW wrote:

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


jonna1006
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 35 replies
  • February 17, 2022
YanW wrote:

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.

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.


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...


jonna1006
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 35 replies
  • February 18, 2022
jonna1006 wrote:

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

 


Forum|alt.badge.img+8
  • Valued Contributor
  • 61 replies
  • March 21, 2022
jonna1006 wrote:

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.


jonna1006
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 35 replies
  • March 21, 2022
bearzooka wrote:

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.


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • November 14, 2023
jonna1006 wrote:

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


Hi, 
Do we have any alternate option to fix this


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings