What command corresponds to turning on GNOME extensions and Ubuntu Dock extension?

In GNOME desktop GUI, we can turn on the extension by a simple click:

The same is true for the Ubuntu Dock extension:

enter image description here

But now I need to do the same thing using command line. So, what command corresponds to turning on GNOME extensions and Ubuntu Dock extension?

Strictly speaking, the command is

$ gdbus call --session \
    --dest org.gnome.Shell.Extensions \
    --object-path /org/gnome/Shell/Extensions \
    --method org.gnome.Shell.Extensions.EnableExtension <uuid>

That calls the D-Bus method that the app uses to enable extensions.

It’s a mouthful, so on the commandline it’s easier to use

$ gnome-extensions enabled <uuid>

which does the same thing, but with more convenience (also: tab completion!)

What happens under the hood is that the extension’s UUID is:

  • added to the list in enabled-extensions from the org.gnome.shell schema
  • removed from the list in disabled-extensions from the org.gnome.shell schema

So using gsettings set ... to manually change those settings will also work.

2 Likes

Thank you. In my first attempt of using gsettings set ..., I only added to enabled-extensions but didn’t remove from disabled-extensions, so the button did not move. Thank you for reminding me of the disabled-extensions list.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.