4

Is it possible to set the order in which extensions/indicators appear in the top panel in gnome 3 as they seem to change position every time I login and I want to set a specific order.

3
  • Which GNOME version?
    – A.B.
    May 26, 2015 at 12:57
  • @A.B. 3.14 I think, the default that comes with 15.04 May 26, 2015 at 13:02
  • Ok, here is your answer :)
    – A.B.
    May 26, 2015 at 13:49

1 Answer 1

3

TL;DR The way is a little bit tricky:

You can reload and so influence the order the extensions.

Use this command and replace <Extension_UUID> with the UUID of the extension, don't use the ID:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method <Extension_UUID>

But I have found that sometimes the extension must be reloaded twice to achieve an effect.


Example:

My system wide extensions:

% ls -og  /usr/share/gnome-shell/extensions
total 4
drwxr-xr-x 2 4096 Mär 31 15:15 GPaste@gnome-shell-extensions.gnome.org

My per user extensions:

% ls -og ~/.local/share/gnome-shell/extensions/
total 16
drwxrwxr-x 3 4096 Mär 26 08:01 drive-menu@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x 3 4096 Mär 26 08:02 laine@knasher.gmail.com
drwxrwxr-x 4 4096 Mär 26 07:56 user-theme@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x 3 4096 Mär 26 07:57 web_search_dialog@awamper.gmail.com

The extension ID should be the folder name, eg. drive-menu@gnome-shell-extensions.gcampax.github.com.

To be sure, I would pick up the UUID from the metadata file:

% less ~/.local/share/gnome-shell/extensions/drive-menu@gnome-shell-extensions.gcampax.github.com/metadata.json
{
  "_generated": "Generated by SweetTooth, do not edit", 
  "description": "A status menu for accessing and unmounting removable devices.", 
  "extension-id": "drive-menu", 
  "gettext-domain": "gnome-shell-extensions", 
  "name": "Removable Drive Menu", 
  "settings-schema": "org.gnome.shell.extensions.drive-menu", 
  "shell-version": [
    "3.16"
  ], 
  "url": "http://git.gnome.org/gnome-shell-extensions", 
  "uuid": "drive-menu@gnome-shell-extensions.gcampax.github.com", 
  "version": 28
}

Therefore this is the command to reload the extension

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.ReloadExtension "drive-menu@gnome-shell-extensions.gcampax.github.com"

The UUID can be determined reliably with the following commands:

Install a JSON parser:

sudo apt-get install jq

Determine the UUID with:

jq '.uuid' ~/.local/share/gnome-shell/extensions/<shell_extension_path>/metadata.json

Example:

% jq '.uuid' ~/.local/share/gnome-shell/extensions/drive-menu@gnome-shell-extensions.gcampax.github.com/metadata.json
"drive-menu@gnome-shell-extensions.gcampax.github.com"

Or all in one:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.ReloadExtension  $(jq '.uuid' ~/.local/share/gnome-shell/extensions/drive-menu@gnome-shell-extensions.gcampax.github.com/metadata.json)

An other great solution is this answer.

2
  • Thank you this works. So if I write a script that runs at startup and reloads them in a specific order I can get them to display in the order I want. May 26, 2015 at 13:49
  • Yes, that right.
    – A.B.
    May 26, 2015 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.