How do I enable and disable GNOME extensions from the command line?

21,360

Solution 1

Run

gsettings set org.gnome.shell disable-user-extensions true

to disable all the extensions enabled by the user (it will remember which of the extensions are currently enabled, won't disable extensions individually).

Similarly, run

gsettings set org.gnome.shell disable-user-extensions false

to enable the extensions.

Solution 2

In the recent versions of GNOME you can use the gnome-extensions command:

gnome-extensions enable <extension>

It's very useful.

gnome-extensions --help
Usage:
  gnome-extensions COMMAND [ARGS…]

Commands:
  help      Print help
  version   Print version
  enable    Enable extension
  disable   Disable extension
  reset     Reset extension
  uninstall Uninstall extension
  list      List extensions
  info      Show extension info
  show      Show extension info
  prefs     Open extension preferences
  create    Create extension
  pack      Package extension
  install   Install extension bundle


Share:
21,360

Related videos on Youtube

Rick T
Author by

Rick T

Updated on September 18, 2022

Comments

  • Rick T
    Rick T over 1 year

    How can I enable/disable GNOME extensions from command line?

    I made a animated gif of what I'm trying to do from the terminal to explain it better. I'm not trying to enable or disable just one extension.

    enter image description here

    I looked at gnome-tweaks -h but it doesn't have the option I'm looking for.

    Options:
      --version             show program's version number and exit
      -h, --help            show this help message and exit
      -t, --test            Enable test and debug code
      -l, --load            Load all tweaks
      -p [/, /usr], --prefix=[/, /usr]
                            Installation prefix (for gsettings schema, themes,
                            etc)
      -v, --verbose         Print the names of settings modified
      -d, --debug           Enable debug output
    
  • Admin
    Admin almost 2 years
    this worked. its just that we have to include the package key only e.g. gnome-extensions enable auto-move-windows and not the full package key we get with gnome-extensions list like [email protected]