5

On my fresh installation of Ubuntu 20.04 a couple of weeks ago, I kept having a problem with Ubuntu's default Gnome extension Desktop Icons, in addition to which it has badly limited functionality.

Unfortunately, it cannot be uninstalled the normal way.

So, I followed instructions (as advised in several places) to uninstall it as follows.

sudo rm --recursive /usr/share/gnome-shell/extensions/desktop-icons@csoriano/   # After making a backup

With that gone, I was able to install the oddly-named but far superior Desktop Icons NG (DING) (by the same author), which works perfectly.

Unfortunately, I get the following error notification several times a day:

Can't install "desktop-icons@csoriano":
This is an extension enabled by your current mode, you can't install manually any update in that session.

Repeating error notification

I don't know how to stop this error repeating itself. I tried three things.

  • Uninstall Desktop Icons NG (DING), and restore the deleted folder from above. That made no difference, and in any case it didn't restore the original Desktop Icons as you might think it would.
  • Attempt to manually install Desktop Icons, but it refuses to install, giving the same error.
  • Reinstall gnome-shell-extension-desktop-icons, which is how Desktop Icons is originally installed. After a reboot, this merely put me back to square 1. (I can't uninstall gnome-shell-extension-desktop-icons because it would remove ubuntu-desktop.)

I don't know what else to do.

I subsequently reinstalled Desktop Icons NG (DING), otherwise I have nothing on my desktop, but this error continues to notify me several times a day.

Here is my list of extensions.

$ gnome-extensions list
caffeine@patapon.info
clipboard-indicator@tudmotu.com
clock-override@gnomeshell.kryogenix.org
user-theme@gnome-shell-extensions.gcampax.github.com
TopIcons@phocean.net
ding@rastersoft.com
wsmatrix@martin.zurowietz.de
ubuntu-appindicators@ubuntu.com
ubuntu-dock@ubuntu.com

I'm using standard Ubuntu 20.04 with Gnome 3.36.3

How can I stop these notifications, please?

Paddy Landau
  • 4,548

3 Answers3

3

I ran into the same issue, and fixed it by manually rebuilding the desktop-icons@csoriano folder using their git repository.

Apparently you cannot really remove desktop-icons@csoriano and other extensions in /usr/share/gnome-shell/extensions/ from the system. They are expected by Ubuntu 20.04 to exist globally. It seems to me like their changes can only be actively overwritten by other (global and local) extensions. Another approach whould be rebuilding a "modified" version of the extension that simply does nothing.

Here are the steps to fully reconstruct the original /usr/share/gnome-shell/extensions/desktop-icons@csoriano/ after deletion:

# Corona-like I stayed at home for this. You can also do this in another location, doesn't matter much for the following steps...
cd ~
# Install the building tools used by the makers of desktop-icons@csoriano
sudo apt update
sudo apt install meson git
# Clone their repository to ~/desktop-icons/.
# MAKE SURE there is no file or directory in home called "desktop-icons"!
git clone https://gitlab.gnome.org/World/ShellExtensions/desktop-icons
# Enter the cloned repository.
cd desktop-icons
# Prepare building the extension using meson.
# This will set the location of the build in it's config. So even if /usr/ is a root location, we don't need sudo for now.
meson --prefix=/usr/ --localedir=share/gnome-shell/extensions/desktop-icons@csoriano/locale .build
# Build the extension. You can execute this using sudo, otherwise you'll be asked for the root password by ninja.
ninja -C .build install

We're technically done. Now let us clean up what we needed for the above.

Remove the cloned repository.

rm -rf ~/desktop-icons/

Remove building tools. You can keep these packages if you like, but they aren't needed for the extension anymore.

sudo apt remove meson git sudo apt autoremove

Apply changes (you might do that after you continued reading this post to the end).

Alternatively you can just restart gnome, for that see https://stackoverflow.com/q/46565019/7638119

sudo reboot

For more information and if you got in trouble while following these steps, visit the official repository and maybe their issue page.

Here are the steps to modify the extension so that that it simply does nothing:

cd /usr/share/gnome-shell/extensions/desktop-icons@csoriano
# empty its entry script
sudo mv extension.js extension.js.old
sudo touch extension.js

(This might causes issues in future updates of Ubuntu 20.04. To undo this modification, just run cd /usr/share/gnome-shell/extensions/desktop-icons@csoriano; sudo mv extension.js.old extension.js.)


You mayhaps got in this situation because you followed the official workaround to fix the Ubuntu 20.04's desktop icons by installing nemo alternatively, like I did. I highly recommend you to undo this and wait for an official patch. Updates on a patch can be seen here on launchpad.net. Other workarounds can be seen there as well.

If you want to uninstall nemo and wait for an official patch of the issue, do the alternative installation in reverse:

# Remove nemo from local autostart.
rm ~/.config/autostart/nemo-autostart-with-gnome.desktop
# Remove the nemo package.
sudo apt remove nemo
sudo apt autoremove

Apply changes.

Alternatively you can just restart gnome, for that see https://stackoverflow.com/q/46565019/7638119

sudo reboot

Niklas E.
  • 156
  • In addition to "rebuilding a modified version that simply does nothing": Maybe this is possible by rebuilding it and then run cd /usr/share/gnome-shell/extensions/desktop-icons@csoriano; mv extension.js extension.js.old; touch extension.js in order to effectively empty its entry script. But I haven't tested this. To undo run: cd /usr/share/gnome-shell/extensions/desktop-icons@csoriano; mv extension.js.old extension.js. – Niklas E. Oct 08 '20 at 21:31
  • I read a bit of the gnome extension wiki. This should work but you need to reboot. Hope all of this was helpful. Please leave me some feedback on how you proceeded in this matter. I'm very interested. – Niklas E. Oct 08 '20 at 21:44
  • Niklas, thank you. I had to also install git :). Incidentally, you don't need sudo with rm; you just need option --force (-f). After removing meson, I used sudo apt autoremove. I hadn't installed nemo, so that was OK. I've left a note about using Desktop Icons NG (DING) on the bug report (in comment #24). – Paddy Landau Oct 09 '20 at 07:47
  • I don't want to go without Desktop Icons NG (DING), so to prevent double desktop icons, I did as you suggest with extensions.js. This works, although it leaves Desktop Icons showing as having an error in the Installed Extensions. Thank you again :) – Paddy Landau Oct 09 '20 at 07:48
  • @PaddyLandau I updated my answer. Thanks for your feedback. Glad I could help you. – Niklas E. Oct 09 '20 at 10:56
  • If I want to use Desktop Icons NG for now, do I need to uninstall the original Desktop Icons extension? Or do I only need to disable it? – Kal Nov 30 '20 at 01:33
  • @Kal Disabling it would be enough for now. I highly recommend to not remove it! Reinstalling it is a pain in the back. Steps on how to disable and enable it again are described in my answer starting with "Here are the steps to modify the extension so that that it simply does nothing: (...)" – Niklas E. Nov 30 '20 at 15:58
  • Thank you, my good friend! This helped with ubuntu 20.10. – Dark Templar Mar 14 '21 at 09:01
2

**** In "Software and Updates" i enabled (main),(Universe),(restricted) and (multiverse)*** it need universe package to be enabled , you can disable it after installing if you dont need it

Solution 1:: Try reinstalling using command

sudo apt install gnome-shell-extension-desktop-icons

Then Reboot..

Solution 2:: Try removing package first if it's installed and not working using

sudo apt purge gnome-shell-extension-desktop-icons
                      or
sudo apt remove gnome-shell-extension-desktop-icons

then do install again using

sudo apt install gnome-shell-extension-desktop-icons

Then Reboot.. Hope This Help

But this extension causing problem when drag and drop from desktop so if you need drag and drop from desktop uninstall it and use the extension https://extensions.gnome.org/extension/2087/desktop-icons-ng-ding Dont forget to reboot after removing extension using

sudo apt purge gnome-shell-extension-desktop-icons
                   or 
sudo apt remove gnome-shell-extension-desktop-icons
  • Thank you for your reply, Rohit. If you read my OP, you'll realise that I had already tried reinstalling gnome-shell-extension-desktop-icons, and that I already had installed Desktop Icons NG (DING). The solution by @Niklas E. solved my problem. – Paddy Landau Dec 19 '20 at 14:10
  • Solution 1 solved it for me – Lucas Zamboulis Oct 26 '21 at 18:16
0

For me installing gnome-shell-extension-desktop-icons-ng is what fixed it for me.

Anonymous
  • 11,699