Posted on 02-16-2022 05:40 PM
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!😊
Solved! Go to Solution.
Posted on 02-17-2022 12:31 PM
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.
Posted on 02-17-2022 06:54 PM
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
Posted on 02-17-2022 10:02 AM
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.
Posted on 02-17-2022 10:09 AM
Here is Docs and Slides being added
Posted on 02-17-2022 10:10 AM
And now you can add them to a Dock Items Policy
Posted on 02-17-2022 11:05 AM
But how can you deploy to universal user, as from the screenshot, you are deploying this to a specific user.
Posted on 02-17-2022 11:53 AM
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...
Posted on 02-17-2022 11:32 AM
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
Posted on 02-17-2022 12:31 PM
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.
Posted on 02-17-2022 12:50 PM
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!!!😀
Posted on 02-17-2022 01:01 PM
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
Posted on 02-17-2022 01:26 PM
For Dock Master, below path works:
~/Applications/Chrome Apps.localized/Gmail.app
Posted on 02-17-2022 02:39 PM
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...
Posted on 02-17-2022 06:54 PM
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
Posted on 03-21-2022 02:26 AM
Hi @jonna1006 Did this work for you to have them as standalone apps? For me they keep opening tabs of an existing window.
Posted on 03-21-2022 07:45 AM
Unfortunately, I realize this method is no longer working, it is only open a tab inside Chrome.
Posted on 11-13-2023 06:30 PM
Hi,
Do we have any alternate option to fix this