* chore(gnome-extensions): Make extension URL quering more robust If there are multiple Gnome extensions with the same name, & they are compatible with Gnome version in the base image, then build will fail. Previously, build would always fail if there are extensions with duplicate names. * docs(gnome-extensions): Fix typo * docs(gnome-extensions): Mention github repo * fix(gnome-extensions): Version checking * chore(gnome-extensions): Make operation order better for reading * feat(gnome-extensions): Use new PK ID installation method * fix(gnome-extensions): Unbound variable error * fix(gnome-extensions): Legacy config order logic * docs(gnome-extensions): Fix spacing * docs(gnome-extension): Delete false-claim about better config readability * chore(gnome-extensions): Add safe check for "null" in if `jq` parsing * chore(gnome-extensions): Update uninstall step to use PK This will break config for uninstalling extensions in literal names, but I bet that no one uses this feature yet since this extension is still new & fresh, so I'll just break it. * Revert to the current module state * docs(gnome-extensions): Add README details about missing gschema.compiled file * chore(gnome-extensions): Introduce hybrid literal-name/PK config If 2 or more same-named extensions are recommended, then user is recommended to use PK ID instead. * chore(gnome-extensions): Ignore ShellCheck 2128 error, since it's harmless & intended * chore(gnome-extensions): Also ignore harmless SC2178 notice * chore(gnome-extensions): Use UUID for matching compiled.gschema workaround rather than extension name * docs(gnome-extensions): Add note in module.yml that PK can be used
4.4 KiB
gnome-extensions
:::caution The legacy configuration format, which uses a part of the extension download URL to declare extensions to install, is still supported. However, it is advised to migrate to new configuration, since it offers the benefits of a clearer configuration & automatic installation of the latest extension version compatible with the GNOME version in the image. The new configuration format is showcased below in detail. :::
The gnome-extensions module can be used to install Gnome extensions inside system directory.
It also supports uninstallation as well, for extensions which are not installed through OS package manager.
This module is universally compatible with all distributions which ship Gnome, as it's not tied to specific distribution packaging format for installing extensions.
Almost all Gnome extensions are compatible for installation.
Thanks to https://extensions.gnome.org which provides releases of extensions as zips, it is very easy to maintain this module configuration.
What does this module do?
- It checks the current Gnome version of your image
- It parses the extension name input from module recipe file
- It processes the jsquery from https://extensions.gnome.org using the extension name input,
which contains useful info about latest extension version compatible with Gnome version of your image - Download archive URL is formed based on the info above
- Downloaded extension archive is then extracted to temporary directory
- All of its extracted files are copied to the appropriate final directories
(/usr/share/gnome-shell/extensions,/usr/share/glib-2.0/schemas, &/usr/share/locale) - Gschema is finally compiled to include the copied extensions schemas to its database
Uninstallation step is performed similarly, except it obviously removes files from the mentioned final directories.
Usage
Extension Installation
By default, latest extension version compatible with Gnome version of your image, is installed.
How to install extensions using the module:
- Go to https://extensions.gnome.org or preferably Extension Manager application
- Search for the extension that you want to install and open its extension page
- If browsing through https://extensions.gnome.org, select the correct GNOME shell version, which matches the GNOME shell version of your image
- The command
gnome-shell --versioncan be used to get the GNOME version of a running system. If there is no GNOME shell version of the extension that matches the GNOME version of your image, that means that extension is not compatible
- The command
- Copy the extension name & input it in module recipe (it is case-sensitive, so be sure that you copied it correctly)
An extension might need additional system dependencies in order to function.
In that case, you should install the required dependencies before the gnome-extensions module is ran.
Information about the required dependencies (if any) are usually on the extension's page.
Extension Uninstallation
Extension uninstallation can be useful to uninstall extensions from the base image,
which are not installed through OS package manager (like extensions installed from gnome-extensions module).
However, if extensions in the base image are installed through OS package manager, than they should be removed through it instead.
How to uninstall extensions using the module:
- Go to Gnome Extensions app, https://extensions.gnome.org/local/ or Extension Manager application
- List of installed system extensions should be presented
- Copy the extension name & input it in module recipe (it is case-sensitive, so be sure that you copied it correctly)
Known issues
Some extensions complain about missing gschema.compiled file
This is a rarity, but some extensions might complain about this one, due to the way they are programmed with hard-coded gschema locations.
Most extensions which follow Gnome extension standards don't have this issue.
If you get the error similar to this one (Fly-Pie extension example):
GLib.FileError: Failed to open file “/usr/share/gnome-shell/extensions/flypie@schneegans.github.com/schemas/gschemas.compiled”: open() failed: No such file or directory
Then please open the issue in BlueBuild Modules GitHub repo with the affecting extension, as it's trivial to fix.
https://github.com/blue-build/modules/issues/new