GNOME Shell 3.2 Extensions
The article will educate a user with information on GNOME Shell 3.2 extensions covering available extensions, creating an extension, anatomy of extensions, enabling extensions and uninstalling extensions.
The GNOME Shell extension design is designed to give a high degree of power to the parts of the GNOME interface managed by the shell, such as window management and application launching. It simply loads arbitrary JavaScript and CSS. This gives developers a way to make many kinds of changes and share those changes with others, without having to patch the original source code and recompile it, and somehow distribute the patched code.
The extension system is a replacement for the “applets” or “widgets” system of GNOME 2. Extensions can add their own items to the top panel, but they can also do much more: adding a custom search provider, for instance.
Available Extensions
There is a large collection of extensions at the GNOME Shell Extensions repository website. If a user has a recent version of GNOME Shell (3.2), a user will be able to flip the switch on a compatible extension’s page to turn it on.
Creating an Extension
There is a tab to show installed extensions, and any errors that occur while loading an extension are in the “Errors” tab. GNOME Shell comes with an interactive extension creator, runnable from a Unix terminal. It starts a user off with a sample extension:
gnome-shell-extension-tool –create-extension
Anatomy of an extension
When creating an extension, a user must pick a uuid. This is a globally-unique identifier for the extension, similar in form to an email address, but need not be an actual email address. An extension, when installed on the filesystem, is a directory whose name is the same as the extension’s uuid.
Inside the directory, the bare bones of an extension are two files, metadata.json and extension.js. The content of a metadata.json looks like this:
{
“uuid”: “myextension@myname.example.com”,
“name”: “My Cool Extension”,
“description”: “Make windows burst into flame”,
“url”: “http://example.com/~myname/myextension”,
“shell-version”: [ “3.2.2″ ]
}
The extension.js file is simply a JavaScript file; it must however have a function called init, which will be invoked at most once directly after the source JS file is loaded. A user should modify all user interfaces in a separate enable function, and remove all custom functionality in a disable function.
Extension installation locations
Extensions can be installed per-user in ~/.local/share/gnome-shell/extensions, or systemwide in /usr/share/gnome-shell/extensions and /usr/local/share/gnome-shell/extensions.
Enabling extensions
• A user can enable and disable extensions on https://extensions.gnome.org/local/
• Per-user and systemwide extensions have to be enabled before they can be used. A user can do this with the GSettings key, org.gnome.shell.enabled-extensions, or several tools that manipulate this GSettings key, such as GnomeTweakTool or a recent version of gnome-shell-extension-tool.
Uninstalling extensions
• A user can uninstall an extension by clicking the uninstall button (”X”) on https://extensions.gnome.org/local/
• Alternatively a user can check the extension installation locations and delete an extension manually.
After reading the article a user would have gained knowledge GNOME Shell 3.2 extensions covering available extensions, creating an extension, anatomy of extensions, enabling extensions and uninstalling extensions.













