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 [email protected]

My per user extensions:

% ls -og ~/.local/share/gnome-shell/extensions/
total 16
drwxrwxr-x 3 4096 Mär 26 08:01 [email protected]
drwxrwxr-x 3 4096 Mär 26 08:02 [email protected]
drwxrwxr-x 4 4096 Mär 26 07:56 [email protected]
drwxrwxr-x 3 4096 Mär 26 07:57 [email protected]

The extension ID should be the folder name, eg. [email protected].

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

% less ~/.local/share/gnome-shell/extensions/[email protected]/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": "[email protected]", 
  "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 "[email protected]"

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/[email protected]/metadata.json
"[email protected]"

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/[email protected]/metadata.json)

An other great solution is this answer.

3
  • 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
  • No longer works in modern versions, but a simple equivalent is gnome-extensions disable <EXT_ID>; gnome-extensions enable <EXT_ID> The extension ID can be obtained the same way without issue.
    – Jeff Chen
    Feb 8 at 23:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .