Pre-installing extensions via Group Policy is not working (Mac)

510 views
Skip to first unread message

Luis Fernando Montoya Gómez

unread,
Jun 22, 2017, 12:20:15 PM6/22/17
to Chromium-dev
Hello everyone,

I'm using a macOS Sierra Version 10.12.5 and I have set the ExtensionInstallForcelist policy in this file chromium/src/out/Default/org.chromium.Chromium.manifest/Contents/Resources/org.chromium.Chromium.manifest but when I run chromium the extension is not there


I have defined the ExtensionInstallForcelist policy like this: 

...
<dict>
<key>pfm_description</key>
<string></string>
<key>pfm_name</key>
<string>ExtensionInstallForcelist</string>
<key>pfm_subkeys</key>
<array>
<dict>
<key>pfm_type</key>
<string>string</string>
</dict>
</array>
<key>pfm_targets</key>
<array>
              <string>gbchcmhmhahfdphkhkmpfmihenigjmpp;https://clients2.google.com/service/update2/crx</string>
</array>
<key>pfm_title</key>
<string></string>
<key>pfm_type</key>
<string>array</string>
</dict>
...

Also I tried to run the chromium as it is described here https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md#Run-Chromium but I got this: "zsh: no such file or directory: out/Default/chrome" So I have to do it like this: "open out/Default/Chromium.app"


Any idea what can i do for getting the extension installed? 

Thank you.


PD: I guarantee I have followed each step from this guide to the letter. https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md

Owen Min

unread,
Jun 27, 2017, 11:07:53 AM6/27/17
to Chromium-dev
Hi Luis,

org.chromium.Chromium.manifest is the definition of Chrome policies. To set up the policy value, you actually need a .plist file that is located in /Library/Managed Preferences or /Library/Preferences. The second one is not mandatory. The name of plist files are:

com.google.Chrome.plist for Chrome

com.google.Chrome.canary.plist for Chrome canary

org.chromium.Chromium.plist for Chromium


Here is an example of the plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ExtensionInstallForcelist</key>
<array>
<string>gbchcmhmhahfdphkhkmpfmihenigjmpp;https://clients2.google.com/service/update2/crx</string>
</array>
</dict>
</plist>

The plist file can be created manually, via command 'defaults write', via Workgroup Manager or any other 3rd-party tools that can modify Preferences/Managed Preferences.

To debug the policies, you can open Chrome and go to chrome://policy. From there, you can always check whether a policy is loaded by Chrome or not.

Also, when build and run Chromium on Mac, you need to run open out/Default/Chromium.app on terminal because it's a .app file. I believe the guide is out of date here.

Luis Fernando Montoya Gómez

unread,
Jun 27, 2017, 1:53:58 PM6/27/17
to Chromium-dev
Hi Owen,

Thank you so much for your help.

After following what you mentioned the extension is not there yet https://www.screencast.com/t/QOSDyghyQ

Any idea?

Thank you!

Owen Min

unread,
Jun 27, 2017, 6:12:51 PM6/27/17
to Chromium-dev
Hi Luis,

ExtensionInstallForcelist only works when the policy level is Mandatory. In other word, the plist file must be put into Managed Preferences. Otherwise, the policy will be ignored.


Owen
Reply all
Reply to author
Forward
0 new messages