Ubuntu – Why are files duplicated in the home folder and desktop?

directoryduplicate fileshome-directorynautilus

Files in my SSD get duplicated on my Desktop. When I delete any folder/file it gets automatically deleted from the second location (Home) and when I create a folder in any of the locations it gets created in both places.

Take this screenshot for reference:

screenshot showing the desktop and the home folder with the same files

I am running Ubuntu 19.04 LTS.

Best Answer

Your user-dirs.dirs folder is messed up, but it's easy to fix it. Open the terminal and run:

nano ~/.config/user-dirs.dirs

If you don't want to use nano you can use your favorite text editor, e.g. gedit.

In user-dirs.dirs you should have some entries similar to the following:


I suppose that in your case your XDG_DESKTOP_DIR entry is just XDG_DESKTOP_DIR="$HOME/". This means that it points to your home directory and that's why you have your home directory "duplicated" on your Desktop. Probably the rest of the entries are messed up too.

Change this entry, along with the rest of them, so they point to the correct locations, as shown above. Save the file and restart your computer for the changes to take effect.


You have to create the Desktop directory first, since you don't have one. To create it run:

mkdir ~/Desktop
Related Question