Ubuntu 20.04 desktop icons keep moving

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.


Solution 1:

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).