You can manually (offline) install GNOME Shell Extension (GSE) without re-downloading the file every time. What you need are only 3 points: knowing the installation folder path, restarting the Shell, and enabling GSE via the Tweaks. This is very useful if you often run Ubuntu LiveCD for example so you just install the saved GSE files, or, share those GSE files to your fellow GNOME friends. Interesting, no? Now enjoy it!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.


Requirements


  1. GNOME Tweaks program installed on your system.
  2. You have the file of the Extension you want to install.
  3. Your desktop environment is GNOME 3. For example, Ubuntu 17.10's desktop is GNOME 3.
You don't need any browser, nor chrome-gnome-shell package, nor internet connection.

GNOME Tweaks, your dear assistant

The Basics


GNOME Shell Extension installation is actually weird. You need to keep these 4 in mind:

  • Downloading the file of a GNOME Shell Extension (GSE) is easy: go to one GSE page like NetSpeed > click at 'Download: Shell Version' > select 3.26 (Ubuntu 17.10's version) > new box appears beside it > click 'Extension Version' > select the highest number > you download the ZIP file of that GSE. 
  • You need the 'UUID' code of each GSE to rename the folder exactly as that UUID. If the file name is 'netspeed@hedayaty.gmail.com.v27.shell-extension.zip' then delete all text starting from .v27 until .zip, you get the UUID 'netspeed@hedayaty.gmail.com'.
  • Installation path: ~/.local/share/gnome-shell/extensions/
  • Installation path, globally as systemwide: /usr/share/gnome-shell/extensions/
Knowing those 4 points might attracts you to be a 'GSE hunter'.

The required folder 'extensions' location

The GSE Files


As example here, I've downloaded some useful GNOME Shell Extensions (GSE) files (see my previous post). Notice the naming of each file:

  • The file name consists of UUID + version number + statement "shell-extension" + extension .zip.  
  • Each file is a compressed .zip file.
  • Each file contains a 'metadata.json' file, containing information about its UUID
My GSE collection

Step 1: Extract GSE File


I take as example here NetSpeed extension.

  • Make sure there is a folder named 'extensions/' at ~/.local/share/gnome-shell/ folder. If there is no such folder, create it.
  • Copy the 'netspeed@hedayaty.gmail.com.v27.shell-extension.zip' file into ~/.local/share/gnome-shell/extensions/. 
  • Right-click the .zip file > Extract Here > you get a folder with same name but .zip extension.
  • Rename the folder by deleting all text from '.27'.
  • The correct folder name would be 'netspeed@hedayaty.gmail.com'. 

How to put GSE folder correctly

Step 2: Restart GNOME Shell


After extracting+renaming, either it's one GSE or many GSEs, you should restart GNOME Shell once.
  • Press Alt+F2
  • Type  r   
  • Press Enter
  • GNOME Shell restarted. You must see a 'flicker' on your screen. 

Step 3: Enable via the Tweaks


After extracting+renaming, and restarting Shell, finally you activate the GSE using GNOME Tweaks.
  • Open the Tweaks.
  • Open the Extension section.
  • You should see the GSE you've just installed there. In this example, NetSpeed.
  • Switch it to ON.
  • Done!

Problems


You may encounter some problems while installing GSE for first time. No worries! Here's some common problems and their solutions.

Problem: I don't know the UUID!
Solution: open the .zip file > open the file 'metadata.json' > read the UUID section there > that's the UUID.

Problem: I don't understand code! How to know the UUID?
Solution: just delete the whole file name except that before the  .vXY . That's the UUID!

Problem: I downloaded a GSE .zip from GitHub, not GNOME website. How to know the UUID?
Solution: just open the metadata.json and read UUID section. Rename the folder to be exactly that UUID.

Additional Tips


  • You better first obtain GSE files and keep them at your disk. You can use them later.
  • You can share the GSE files with your friends! Isn't that wonderful?
  • Example of usage: I myself use this offline method to write articles about GNOME Shell Extensions using Ubuntu LiveCD. I don't need to re-download again each GSE.

This article is licensed under Creative Commons Attribution-ShareAlike 3.0.


, , , , ,