Desktop folder and files disappeared

I restarted my computer, and when I logged back in, I noticed that all of my files that were on the desktop are gone. Instead, icons of all of my home folder are showed on my desktop.

I opened the terminal and found out that there is no ~/Desktop folder.

What happened? What do I need to do?

12.04 32-bit WUBI installed.


You need to edit the ~/.config/user-dirs.dirs file. Make sure the contents of the file are like the following:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/Share"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Then restart nautilus:

killall nautilus

or

nautilus -q

Then, open nautilus via Unity menu (press the Super key) or using the run command (Alt+F2)


I faced the same issue yesterday and the following commands did the trick;

gconftool-2 --recursive-unset /apps/compiz-1

unity --reset &

But mine is a general install, not through WUBI.


I was also having similar issues. What I see went wrong is my $HOME variable is pointing to /tmp instead of /home/username.


I had the same problem with missing ~/Desktop folder.

After a routine upgrade to Ubuntu 20.04.2 LTS, my /home//Desktop directory was gone and all folders and files from my home directory appeared on my desktop.

I recreated the Desktop directory and updated the ~/.config/user-dirs.dirs file as answered by user green above.

XDG_DESKTOP_DIR="$HOME/Desktop"

This worked for me, with my desktop back to normal.