13

My Desktop icons keep toggling between these two types of arrangement (image attached):

arrangement 1

arrangement 2

I can't really tell what triggers the toggle. It seems like the first type occurs after logging in, and then it switches to the second type when specific actions are done. I tested it by creating a new directory in the Desktop. This sometimes triggers the change, but sometimes not. Sometimes moving the newly created directory to trash seems to trigger it.

Turning on/off the Desktop icons extension does not seem to do anything.

How do I fix this?

Just to note, I am using Nemo as my default file manager.

UPDATE: This was helpful. By removing the Desktop icons extension (apparently by deleting the actual directory of the extension) and making Nemo handle the desktop icons seems to be working fine.

CluelessNoob
  • 2,275
  • 3
  • 24
  • 29
  • Felling that dash-to-panel is somehow responsible. – HattinGokbori87 May 03 '20 at 00:58
  • 1
    @HattinGokbori87 Could be. I tried disabling Dash to panel and the issue seemed to be gone. Except when I enabled the Desktop icons extension out of curiosity, the same problem started again. Disabling both Dash to panel and Desktop icons extensions seems to be working. However, I am really used to Dash to panel and don't want to have it disabled. – CluelessNoob May 03 '20 at 01:58
  • Indeed, you likely discovered an issue related to the combined use of these extensions. You should consider filing this with the developers of both extensions. – vanadium May 03 '20 at 10:19
  • @vanadium I don't know if combining these two extensions is the issue because I have Desktop icons extension disabled anyway. So chances are it's Dash to panel only. Since 20.04 is still very new, I guess I'll wait for a few days for it to get fixed hopefully. – CluelessNoob May 03 '20 at 11:10
  • That I do not understand. With Desktop icons disabled there should be no icons on your desktop in the first place. You will need to give more clarity. Using nemo file manager to provide the icons by any chance? – vanadium May 03 '20 at 15:41
  • @vanadium I am using Nemo as the default file manager. However, I don't think the desktop icons are related to Nemo, although they do open with Nemo. It's a bit different than 18.04, so I can't really tell. Here are the 2 commands that I last ran trying to be sure: gsettings set org.nemo.desktop show-desktop-icons false and xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search – CluelessNoob May 04 '20 at 00:55
  • @vanadium One more thing to note if that helps, if I remember correctly, in Ubuntu 18.04 I had to add nemo-desktop to startup applications. But in 20.04 that does not seem to be necessary. No idea if that is related though. – CluelessNoob May 04 '20 at 01:00
  • You will need to add that info in your post - use edit. If you have desktop icons with the "Desktop extensions" off, then you most likely have nemo providing desktop icons, in other words, you do not have a standard setup. Likely you did not do a fresh install but an upgrade. Also this should be explicitly clear in your post. – vanadium May 04 '20 at 06:51
  • @vanadium Mine is a fresh install. Although I upgraded from 18.04, I did not use the upgrade feature but just did a fresh install completely. I have another account in the same system where Nemo is not the default file manager. The Desktop icons extension is disabled there and still home and trash icons are showing. I also have a copy of 20.04 running in Virtualbox where Nemo and Dash to panel are not even installed. Same case, Desktop icons extension disabled, icons and files/folders still showing. Although, the icons re-arranging problem doesn't seem to be happening there. – CluelessNoob May 04 '20 at 13:29
  • OK, with nemo handling the desktop, you are out of the comfort zone. Gnome extensions are made for the Gnome Shell desktop. What you should probably do is not allowing nemo to handle the desktop anymore, and leave that to the Desktop Icons extension. Although that has its own limitation still, you won't have the issue with changing icon layout. – vanadium May 04 '20 at 14:58
  • @vanadium Nemo opens the Desktop folders (including home and trash), but I don't think it actually draws them. From what I tried in Virtualbox, it seems like sudo apt install nemo and xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search are sufficient to use Nemo. Also as I said, the Desktop icons extension seems to have no effect - on or off, even without Nemo installed. Anyways, I guess I can accept the rearranging problem for now if it is caused by Nemo as I prefer Nemo to the default one. Hopefully it will be fixed soon. Thanks. – CluelessNoob May 05 '20 at 01:00

2 Answers2

2

As already mentioned in the update to the question, the solution is to disable the Gnome Shell "desktop-icons" extension, and use the Nemo desktop instead.

Here are detailed instructions to do that:

# install Nemo
sudo apt install nemo

Edit settings

gsettings set org.gnome.desktop.background show-desktop-icons false gsettings set org.nemo.desktop show-desktop-icons true

Disable the "desktop-icons" extension

gnome-extensions disable desktop-icons@csoriano

Set nemo-desktop to autostart on login

cp /usr/share/applications/nemo-autostart.desktop $HOME/.config/autostart/ sed -i -r 's/^(OnlyShowIn)/#\1/i' $HOME/.config/autostart/nemo-autostart.desktop

The last sed line is to comment out the line OnlyShowIn=X-Cinnamon; in the .desktop file. Otherwise, it would only run with Cinnamon.

Note that you don't need to delete the original Gnome "dektop-icons" extension, as many answers to similar questions suggest. The gnome-extensions command can be used instead.

To review the state of all installed Gnome extensions, I also find this command useful:

gnome-extensions list | while read id; do gnome-extensions show "$id"; done

Note: According to a comment here, it seems that in some cases you may need to reboot after the change for it to take effect (logging out and back in may not be enough).

mivk
  • 5,312
  • If I remember correctly, I did disable the Desktop icons extension using Gnome tweaks GUI before, but it only seemed to fix the issue after removing the actual directory of the extension. This time however (fresh installation again), using the gnome-extensions disable desktop-icons@csoriano command seems to be working (maybe it was a bug that was fixed). I copied the autostart file and then removed the OnlyShowIn=X-Cinnamon; line. Now it seems to be working fine. Thanks. – CluelessNoob Jun 20 '21 at 16:10
  • no need to do that, see the other solution by changing the resolution (and changing it back) – Thomas Covenant Feb 19 '22 at 08:14
1

I have read all the posts trying to solve this on Ubuntu 20.00. None of them apply. Right-clicking on the desktop shows a completely different menu with the desired option not there or in settings either. Nothing matched.

THEN, I tried reducing the resolution by one level. I didn't want to as I have a large screen and wanted as much on it as possible... But I did. (from 1920x1080 to 1680x1050).

Guess what... It worked! My desktop icons remain where I put them! Even when they vanish after editing a document (that is another issue) when I restart or start anew, they are back where I want them.

ThunderBird
  • 1,955