Editing Zorin's gnome-shell-extensions

If you want to change or edit the preinstalled extensions, don't make the same mistake I did yesterday.

I had simply copied the extension I wanted from /usr/share/gnome-shell/extensions to ~/.local/share/gnome-shell/extensions.

However, this caused all extensions to stop working properly and gnome-shell to crash constantly, as evidenced by the fact that, for example, the taskbar or desktop icons disappeared as soon as the screen was blanking due to inactivity.
With the extension-manager I had to disable and re-enable the slider for "use extensions" all the time to make the extensions work again.

That happened as soon as I copied the original extension folder into the user's directory and logged out and in again, even without having edited something!

How can you avoid such problems?

After you have copied the extension to your user's directory, rename it, e.g. to zorin-taskbar-edit@zorinos.com. Then open the folder and search for the file "metadata.json" and change in the line "uuid" the name of the extension, too, e.g. to "zorin-taskbar-edit@zorinos.com" and save it.
You can also change the line "name" to that name, e.g. "Zorin Taskbar Edit".
Then logout.

Now, you'll see in the extension manager a new entry at user installed extensions with the name you gave.
To make tests with the extension, disable the original extension in the system's extensions list and enable your new created extension. Now you can make changes to the files and you don't need root rights and don't damage the original extension.

This is an alternative to editing the original extensions (after a backup copy was created) in the /usr/share/gnome-shell/extensions directory with root rights.

The problem arose because there were two extensions with the same name.

3 Likes

You could also work on it in the usr Directory. So, You don't have to copy something.

1 Like

Yes, that's right. The advantage of doing it this way is that the original extensions remain untouched, and you don't need root privileges to edit them (copying the original file to the user directory doesn't require root privileges).

This is safer and easier for testing scenarios where you don't yet know exactly what changes you'll need to make and need to open many files. After each change you have to logout to test the extension. In Xorg, you might be able to simply reload gnome-shell without logging out, but that doesn't work in Wayland.

When you have saved the extension in the user's directory, you don't have to enter your password every time after logout to elevate to root again.

If I already know exactly what I want to change, I edit the file directly in /usr.

In that regard, can someone please tell me how to enable "Recent" files for root? Or is that not possible at all? In any case, I really miss that feature, since I can't access the files I last edited as root in Nautilus and have to navigate through the directories from scratch every time.

1 Like