Posted on 01-16-2020 06:24 AM
Hi,
at our company we are using G-Suite, which means we primarily want our users to run Gmail in Chrome to get full compatibility. However a lot of the users, including myself, find this not so user friendly as using, for example Outlook, since the gmail-tab often get lost among all other sites you are browsing.
Now, Chrome has a nice feature where you can create a shortcut in the dock to whatever website you like, and then also run the website in a separate fullscreen window which gives the look and feeling as it's a separate application. It also give you a separate icon in the Dock with the websites logo.
To do this, you simply press the menu button in Chrome--> More Tools--> Create shortcut... ---> Check the "Open as Window" option and you're done. This gives an application under your homefolder: /Users/yourusername/Applications/Chrome Apps.localized/nameofthewebsite.app
Since the application is located under the local user account I'm unable to create a working install package to deploy the application. Tried using composer to install the packages under a different location, which works but there is a reference to my personal homefolder in a .plist file which results in the application not being able to function properly.
I guess to achieve what I want I'll need to:
Has anyone else managed to add the shortcuts/apps the way I want to? I know there is a way to add websites in a config profile with “Web Clips”, but doing this won’t run the application in it’s own window or always open in Chrome.
Or is there a better way to achieve this?
Posted on 01-16-2020 09:07 AM
Using Composer build a DMG using the FUT = Fill User Template & FEU = Fill Existing Users options. Not sure if that is what you are looking for but might help/be worth a look. More explanation here
Posted on 01-17-2020 02:23 AM
Thanks for the input sdbunbar, this helped to get the applications in the correct folder. So, step 1 of 3 is solved!
Posted on 01-21-2020 06:37 AM
After some investigation I've located the row in the info.plist-file that needs to be changed:
<key>CrAppModeUserDataDir</key> <string>/Users/username/Library/Application Support/Google/Chrome/Default/Web Applications/_crx_binpgnpeamagklaedlihggaijigldhnk</string>
Have tried to simply remove the row in hopes that it gets populated automatically which did not work, neither does deleting the whole .plist-file. Longshots both, but you never know...
So, still back to creating a script that gets the local users home directory and adds that to the specific row in the -plist-file.
How would this be done?
The .plist-file is located in:
/Users/username/Applications/Chrome Apps.localized/Gmail.app/Contents/info.plist
Posted on 03-13-2020 02:23 AM
Using the following Bash script I've successfully managed to change the entry in the .plist file and the applications can now be opened. However they don't open as window but instead a new Chrome-window with the menu-bar and everything. So, that setting is obviously controlled by something else, but I can't find where.
#!/bin/bash
USER=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')
/usr/libexec/PlistBuddy -c "Set :CrAppModeUserDataDir /Users/${USER}/Library/Application Support/Google/Chrome/Default/Web Applications/_crx_kjbdgfilnfhdoflbpgamdcdgpehopbep" /Users/$USER/Applications/Chrome Apps.localized/Company Name Mail.app/Contents/Info.plist
exit
Posted on 05-27-2021 02:06 PM
@HappyMarcus did you ever get this functioning?
Posted on 07-19-2021 03:40 PM
Yes I would love to do this for my organization as well!
Any updates to share @HappyMarcus ?
Posted on 12-09-2021 02:17 AM
Sorry to let you down but no, I never found a solution for this. Gave up since I had more urgent things to do and has since then changed employee, so won't be looking into this any further.