10

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.

Braiam
  • 67,791
  • 32
  • 179
  • 269
Greg
  • 101
  • 1
    Lets do a search and hope it's there somewhere. Open a terminal window and type "find Desktop" without the quotes. If that doesn't work, try the following: "find | grep desktop" which will certainly produce some output but you'll have to look at it carefully to see if your files are there. If that still doesn't work we might have to start searching the whole hard drive. – fabricator4 Sep 16 '12 at 05:23
  • You could also do a search for one of the files that are missing if you can remember the exact filename eg: "find yourfile.name". If you cant't remember all of the filename use as much of the filename as you are certain of and use asterisk wildcards for the rest eg *ourfile.* – fabricator4 Sep 16 '12 at 05:27
  • Yesterday my ~/Trash folder disappeared and a directory in ~/.local/share. Reason unknown. Version: Daily updated Ubuntu 12.04 LTE (not WUBI). – guettli Nov 30 '12 at 09:14

5 Answers5

11

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)

green
  • 14,306
  • Thanks! That did it. It happened to me last night after a system update. Seems to be widespread. Any idea what caused it? – Jorge M. Treviño Oct 05 '12 at 18:40
  • 1
    Thanks for your solution too! My problem is a bit different: all folders and files on the desktop disappear, but files on home aren't showed either. Just mark down for others with the same problem as mine. – JavaNoScript Jul 30 '13 at 02:16
  • @XuJiawan It's good to know that the solution solved the problem. However, if the problem was different it'd be better if you ask a new question and I'd post the solution there. This is because it is preferred to have one question per thread, even when the solutions are same. – green Jul 30 '13 at 07:34
  • @green7 Thanks for your suggestion. I've posted my problem here with your solution. ^_^ – JavaNoScript Aug 02 '13 at 02:56
  • 1
    Did not resolve the vanishing of ~/Desktop and files contained therein on my system. my user-dirs.drs is set up correctly. – Lexible Jan 02 '19 at 18:17
3

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.

1

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.

1

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

Seth
  • 58,122
Patrick
  • 21
  • 1
0

Thanks, for GNOME desktop on Ubuntu 22.04 I recreated missing folders manually with terminal, just:

cd ~ 
mkdir Videos Documents

and all missing folders + use config that is provided up above. Thanks!