Desktop icon positions not remembered between sessions

It's possible that a file recording the position of icons on your desktop cannot be modified due to wrong permissions.

To identify such files, run find . '!' -user $USER.

In your case, the output included ~/.local/share/gvfs-metadata/home. Changing the ownership of this file to you should fix your problem.

Content of ~/.local/share/gvfs-metadata

In general, very few, if any, files and folders in your home folder should be owned by root.


Ubuntu 18.04

When you browse with nautilus as root it is possible (for no reasons) that the file recording the position of icons on your desktop cannot be modified due to wrong ownership. It can happen when you, for example, want to copy the hidden files of your home for new users to keep the configurations or if you want to construct the /etc/skel folder by copying some home folders in it. The concerning file causing this behavior is the 'home' in the hidden .local directory of your home folder which got the wrong ownership (root).

You can solve this problem changing the ownnership back to your username and eventually the file permissions with these commands:

sudo chmod $USER ~/.local/share/gvfs-metadata/home

sudo chmod 755 ~/.local/share/gvfs-metadata/homea

Do not change the ownership of all files in the .local folder because some of them (really few) has to maintain the root ownership. The use of nautilus or others file managers as root is discouraged in favor of the bash terminal although sometimes it is really practical.

When I was answering I have found this related topic if it can be of any use: Ask Ubuntu