Requiring the extension to be on (Linux only)
Chromium based browsers
-
Turn on developer mode on the
chrome:///extensionspage -
In the extensions page, click pack extension. Then select the directory of mandatorytask.
manifest.jsonshould be contained in that directory as mentioned under "installation". This will create amandatorytask.crxfile. Remember the location of this file. -
Find the location of the packed extension in your file manager or use
file:///. Then drag and drop themandatorytask.crxfile into the extensions page, clicking "allow" to install the extension. -
Click details and copy the ID of the extension
-
Open a terminal with root access. Create the file
test.json(or any name you want, must end in.json) in/etc/chromium-browser/policies/managed/or similar depending on your browser. It's/etc/brave/policies/managed/for Brave and/etc/opt/chrome/policies/managedfor Google Chrome. Search "how to set [insert browser name] policy on linux" and you should get the location. -
In the
test.jsonfile, insert{"ExtensionInstallForcelist": ["insert-extension-id-from-step-4"]}. See https://chromeenterprise.google/policies/#ExtensionInstallForcelist. Note the square brackets! You can also add"BrowserAddPersonEnabled": false,"BrowserGuestModeEnabled": falseand"IncognitoModeAvailability": 1for additional layers of preventing workarounds. Note the options you provide are listed around two curly braces{}and are in format"key": valuefor each option with commas between two options.
So if you combine all 4 options listed here, the test.json file will look like this:
{"ExtensionInstallForcelist": ["insert-extension-id-from-step-4"], "BrowserAddPersonEnabled": false, "BrowserGuestModeEnabled": false, "IncognitoModeAvailability": 1}