Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (or document?) a mechanism for a system wide install #153

Open
berolinux opened this issue Jul 16, 2024 · 3 comments
Open

Add (or document?) a mechanism for a system wide install #153

berolinux opened this issue Jul 16, 2024 · 3 comments

Comments

@berolinux
Copy link

Hi,
we're using Ungoogled Chromium as the main browser in our Linux distro (OpenMandriva), and would like to make extensions "just work" for the users.
This project seems to be the right way to go about it - and works perfectly when installed as described in README.md.
But there doesn't seem to be a way to automatically install it with ungoogled chromium for all users on the system -- every user seems to have to install the CRX through chromium's UI.

It would be nice to have a way to just have an unattended system wide installation of the plugin.

@NeverDecaf
Copy link
Owner

I believe you can achieve this with the ExtensionInstallForcelist policy. #28 may also be of interest to you.

@berolinux
Copy link
Author

Thanks, but it doesn't seem to work...

I've put this in /etc/chromium/policies/managed/extensions.json:

{
  "ExtensionInstallForceList": [
    "ocaahdebbfolfmndjeplogmgcagdmblk;https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates.xml"
  ]
}

I've also tried some variants that are even closer to what I'd like to see, e.g.

{
  "ExtensionInstallForceList": [
    "ocaahdebbfolfmndjeplogmgcagdmblk;file:///usr/share/chromium/extensions/webstore/updates.xml"
  ]
}

and the one that should really come closest to what I'm trying to achieve:

{
  "ExtensionSettings": {
    "*": {
      "installation_mode": "allowed"
    },
    "ocaahdebbfolfmndjeplogmgcagdmblk": {
      "installation_mode": "normal_installed",
      "update_url":
        "file:///usr/share/chromium/extensions/webstore/updates.xml"
    }
  }
}

where /usr/share/chromium/extensions/webstore/updates.xml says

<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
  <app appid='ocaahdebbfolfmndjeplogmgcagdmblk'>
    <updatecheck codebase='file:///usr/share/chromium/extensions/webstore/Chromium.Web.Store.crx' version='1.5.4.3' status='ok' />
  </app>
</gupdate>

and /usr/share/chromium/extensions/webstore/Chromium.Web.Store.crx is an already downloaded copy of Chromium.Web.Store.crx.

None of those seem to have any effect whatsover - the "My Extensions" list in chrome://extensions/ remains empty.

However, as soon as /etc/chromium/policies/managed/extensions.json exists, it says "Your browser is managed by your organization" (and that message goes away again when deleting the json file), so it looks like the file is in the right place.

Am I missing something?

@NeverDecaf
Copy link
Owner

I wish I had a better answer for you but after working with several google APIs my assumption would be that it simply doesn't work because this feature wasn't maintained. I was able to find several mentions of master_preferences which may be an alternative (see: https://www.chromium.org/administrators/pre-installed-extensions/) but beyond this I don't know of any non-hacky way to pre-install extensions. I assume it is possible by editing the user data directory but have never done it. You may have more luck opening an issue at the ungoogled chromium repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants