Feature summary
Currently, the only "official" way of installing GNOME extensions is by manually visiting https://extensions.gnome.org with a browser, browsing/searching for a desired extension there, then clicking on the blue "Install" button on the extension's detail page. This will then (eventually) trigger a modal asking for installation confirmation.
It is thereby currently not possible to automate an extension-enhanced GNOME desktop environment setup without resorting to workarounds.
Also, extensions can only be installed one by one; therefore, in a typical productive/usable GNOME environment with multiple extensions, it requires a manual modal confirmation for each extension.
This is an issue/feature other users are also looking for:
- https://unix.stackexchange.com/q/617288/20230
- https://stackoverflow.com/q/72857634/923560
- https://stackoverflow.com/q/43357370/923560
- https://discussion.fedoraproject.org/t/how-to-install-gnome-extensions-globally-and-allow-automatic-updates/90895
- https://github.com/brunelli/gnome-shell-extension-installer
- https://www.reddit.com/r/gnome/comments/rbl85n/installing_gnomeshell_extensions_on_command_line/
- https://discourse.gnome.org/t/enable-gnome-extensions-without-session-restart/7936
How (manual) GNOME extension installation currently works
As an example, I use the extension Extension List by grroot.
On that extension's detail page, clicking the blue Install button triggers an undocumented xdg-mime/xdg-open integration with gnome-browser-connector (org.gnome.BrowserConnector
) on the gnome-extensions://
.
For this example, the URL is gnome-extensions://extension-list%40tu.berry?action=install .
gnome-browser-connector will then delegate to org.gnome.Shell.Extensions
's method org.gnome.Shell.Extensions.InstallRemoteExtension
. This is effectively as executing the following command:
gdbus call --session \ --dest org.gnome.Shell.Extensions \ --object-path /org/gnome/Shell/Extensions \ --method org.gnome.Shell.Extensions.InstallRemoteExtension \ "extension-list@tu.berry"
This method is implemented in gnome-shell/js/ui/extensionDownloader.js
's installExtension(...)
and will open an InstallExtensionDialog extends ModalDialog.ModalDialog
. Only by manually interacting with this modal's Install button, it is possible to install the extension (implemented in InstallExtensionDialog._onInstallButtonPressed()
.
How would you like it to work
Preferably, gnome-extensions install ...
would allow for installing (one or more) extensions by providing their IDs ("uuid
" in gnome-extensions parlance), and would do so without requiring user interaction. E.g.: gnome-extensions install 'extension-list@tu.berry'
. (Finding out some extension's uuid
is not easy itself, as https://extensions.gnome.org doesn't show it...).
As an interim solution, it would probably be easier to just expose/export/make public a DBus method that delegates to what is done in InstallExtensionDialog._onInstallButtonPressed()
.
Relevant links, screenshots, screencasts etc.
Edited by Trenton Fumaki