GithubHelp home page GithubHelp logo

xsmile / chromexup Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 1.0 19 KB

External extension updater for Chromium based browsers

License: MIT License

Python 98.17% Batchfile 1.83%
browser chromium extension updater inox iridium ungoogled

chromexup's Introduction

chromexup

External extension updater for Chromium based browsers.

Description

This tool was created due to missing update mechanisms for extensions in privacy-focused variants of Chromium.

Chromium extensions can be installed inline via the Chrome Web Store or deployed automatically from an external location. An external extension is set up by referencing its local path and version in a location hard-coded in the browser.

Linux and macOS versions of Chromium both support loading extensions from the External Extensions directory in the Chromium user data folder. The windows version on the other hand supports loading extensions referenced by a static registry key. While the first case supports different sets of extensions for each Chromium user data folder, the second does not and only allows a single set for an OS user.

chromexup uses configuration files to keep different sets of extensions updated and remove orphaned ones, if necessary.

Extensions can be updated automatically by using the various automation scripts.

To avoid different kinds of issues, extensions should be installed and removed by using this tool only.

F.A.Q.

An extension was removed manually via chrome://extensions and does not reappear after trying to install it again with chromexup.

The extension was blacklisted by the browser. To remove it from the blacklist, it needs to be installed by dropping the .crx file in the chrome://extensions page (make sure that Developer Mode is enabled) and uninstalled again.

Installation Instructions

  1. Install python3 using a package manager of your choice and add the install directory to PATH.
  2. Install chromexup with python3 setup.py install --optimize=1.
  3. Create the configuration file <APP_DATA>/chromexup/config.ini using the template and edit it to your liking. Depending on the OS, the path for <APP_DATA> is as follows:
    • Linux: ~/.config
    • macOS: ~/Library/Application\ Support
    • Windows: %AppData%
  4. Repeat step 3. with a differently named configuration file for another browser variant if needed.
  5. Run chromexup to verify the tool is working as intended.
  6. Set up automatic updates if necessary (see next section).

Automatic Updates

Automation scripts for different operating systems are located in the scripts directory.

Linux (systemd)

  • Copy the service chromexup.service and one of the timers chromexup-{daily,weekly}.timer to ~/.config/systemd/user.
  • Enable the timer with systemctl --user enable <TIMER>.

macOS (launchd)

  • Copy one of the launchd user agents local.chromexup.{daily,weekly}.plist to ~/Library/LaunchAgents.
  • Load the user agent or re-login.

Windows (taskschd)

  • Run one of the batch files chromexup-{daily,weekly}.bat to create a new update task.

chromexup's People

Contributors

renr3n avatar xsmile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

smopro

chromexup's Issues

Error when extension is deleted in webstore

I have this extension installed and now it's gone - error 404. https://chrome.google.com/webstore/detail/olffebgbihkemhnlpeficnplfoiabljj

Traceback (most recent call last):
  File "/usr/bin/chromexup", line 11, in <module>
    load_entry_point('chromexup==0.4.1', 'console_scripts', 'chromexup')()
  File "/usr/lib/python3.6/site-packages/chromexup/main.py", line 327, in main
    pool.map(process, extensions)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/lib/python3.6/site-packages/chromexup/main.py", line 49, in process
    (latest_ver, url) = _get_latest_version(id)
  File "/usr/lib/python3.6/site-packages/chromexup/main.py", line 101, in _get_latest_version
    url = r.next.url
AttributeError: 'NoneType' object has no attribute 'url'

Multiple profiles

Does this work with the default profile only? I have three more profiles with different sets of extensions. I hope you could support them as well.

And thank you for this package.

Set up extensions for a single browser variant

Chromium doesn't utilize the External Extensions directory in Windows and won't read JSON preferences files. Currently extensions are set up as pre-installed but they are loaded by all Chromium variants of an OS user, assuming the registry entries are stored under HKEY_CURRENT_USER.

Find a way to workaround this limitation to allow extensions to be set up independently for each browser variant, possibly by patching Chromium.

Add profile-sync-daemon to systemd's After=

I have installed and enabled profile-sync-daemon on my machine. After that, the systemd service for chromexup fails with "no such file or directory". I had to add psd-resync to After=.

Update extensions on more than one browser

I have both inox and iridium installed on my linux. I want to update my extensions on both browsers at once. Something like this:

branding = iridium, inox

This would be enough for me since I want to have the same set of extensions in both browsers. For those who want separate set of extensions, additional config would be needed.

CRX3 extension support, Debug option

I have a problem installing HTTPS Everywhere.

[WARNING] extension is not downloadable gcbommkclmclpchllfjekcdonpmejbdp

I had this for weeks. I thought it was just a server issue. I tried to remove and reinstall. It's still not working.

EDIT: I just remembered I use adblocking. It could have been blocked by that. I just don't know what domain to whitelist. Can you add a debug option?

Remove extensions

How should I properly remove extensions? I removed one of my extensions from the browser settings. I initiated chromexup to install it again but it's not showing up. I also tried deleting the files in External Extensions folder. Same thing.

Getting warning after removed extension was reinstated

I have installed this extension https://chrome.google.com/webstore/detail/tabs-outliner/eggkanocgddhmamlbiijnphhppkpkmkl

One day, I got [WARNING] extension is not downloadable eggkanocgddhmamlbiijnphhppkpkmkl. It was not in the webstore anymore. I didn't remove it yet as I couldn't find an alternative. Days later, I can see the extension in the webstore. But I'm still getting the warning when running chromexup. It still has the same extension ID.

Change extension path in Windows

Don't assume an existing %LocalAppData%\Chromium directory and store extensions in %AppData%\chromexup\External Extensions instead.

Extension version not found

I started to get this error yesterday:

$ chromexup -v
[DEBUG] found 1 configuration file(s): ['/home/ren/.config/chromexup/config.ini']
[INFO] config.ini, processing 1 extension(s)
[DEBUG] Starting new HTTPS connection (1): clients2.google.com:443
[DEBUG] https://clients2.google.com:443 "GET /service/update2/crx?response=redirect&prodversion=199&acceptformat=crx2,crx3&x=id%3Dcjpalhdlnbpafiamejdnhcphjbkeiagm%26installsource%3Dondemand%26uc HTTP/1.1" 302 None
[ERROR] extension version not found
[DEBUG] https://clients2.googleusercontent.com/crx/blobs/Acy1k0YbWUzdtO9XsX05qikx6LtzwKWitrph8jtfnCwZBMaLGOpkjh8DY4J9w8U6dBnUr3UKo6LdSiZeGYRAn5V5X60Qzpam8defKBbvq4lYy7rgfvDqWwDGUprlhTE0HsxkPA2Y5N5ErsySnsd1BFo/CJPALHDLNBPAFIAMEJDNHCPHJBKEIAGM_1_52_2_0.crx
Traceback (most recent call last):
  File "/usr/bin/chromexup", line 33, in <module>
    sys.exit(load_entry_point('chromexup==0.5.1', 'console_scripts', 'chromexup')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/chromexup/main.py", line 342, in main
    pool.map(process, extensions)
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/chromexup/main.py", line 49, in process
    (latest_ver, url) = _get_latest_version(id)
                        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/chromexup/main.py", line 113, in _get_latest_version
    raise RuntimeError
RuntimeError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.