Ubuntu – Gnome shell extensions are disabled after reboot

gnomegnome-shellgnome-shell-extension

I am running Ubuntu 14.10 with Gnome 3.14 from the Gnome 3 PPA's. I have had the persistent problem for about a year now where whenever I log out I lose all of my enabled extensions apart from Media Player. Previously I managed to get around this by enabling each of the extensions at start up using "gnome-session-manager", but this has now disappeared from Gnome 3.14 since it has been replaced by right click options on the dash. I also tried defaulting my boot session to "default session" which has worked for some people as a solution.

There now seems to be no work around for this very annoying and persistent problem with Gnome. It has been a lurking issue for at least a year now with many users effected and nothing but the load at boot workaround on offer. How such a chronic bug can be allowed to sit for over a year is frankly beyond me.

Has anyone got any fresh ideas for a more permanent solution to this Gnome bug ?

Stephen

Best Answer

Here's a workaround in the spirit of this answer. This works at least for 3.12. The idea is to export a list of the extensions you want active, then write a script that activate them at boot.

Getting extension list

First, activate the extensions you want active. We then generate a list with those:

In terminal (Ctrl + Alt + T), run

gsettings get org.gnome.shell enabled-extensions

It returns a list with your currently active extensions a la

['Bottom_Panel@rmy.pobox.com', 'impatience@gfxmonk.net']

Setting extensions

To activate exactly the extensions in the list, run

gsettings set org.gnome.shell enabled-extensions ['extension_1',  'extension_2', 'extension_3']

but with your own list, naturally :)

Script to set extensions on boot

To automate on boot, create a script running that command.

  1. Go to e.g. your home folder, and create a new empty file. Name it script_name.sh (only the extension matters). Start the file name with a full stop . if you want it to be hidden.

  2. In that file, write

#!/bin/bash

gsettings set org.gnome.shell enabled-extensions ['extension_1',  'extension_2', 'extension_3']

Then save the file, of course :)

  1. Make the file executable e.g. by right click > Properties > Permissions > Check "Allow executing file as program" Alternatively, change the permissions from terminal by running chmod ugo+x script_name.sh in the script's folder.

  2. Make it on system start up (I don't know how else to do this): in ~/.config/autostart/ create a file called some_name2.desktop and in it put

[Desktop Entry]
Name=your_prefered_name_here
Exec=/home/your_user_name/.script_name.sh
# Terminal=false
Type=Application
Hidden=false
StartupNotify=false
Name[en_US]=your_prefered_name_here

The path after Exec= should be to where the script you created in step 2 is. Again, save the file :)

Maybe immediately or else after boot, you should see the script in Gnome Tweak Tool under Startup Applications. It should also run on startup.

Activating and Deactivating Extensions

If you want to change which extensions are run, you should re-generate the list, then insert the new list in the script run.

Final Words

I hope this works in 3.14, too.

Related Question