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.

3
  • 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. Sep 16, 2012 at 5: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.* Sep 16, 2012 at 5: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, 2012 at 9:14

5 Answers 5

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)

5
  • Thanks! That did it. It happened to me last night after a system update. Seems to be widespread. Any idea what caused it? Oct 5, 2012 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. Jul 30, 2013 at 2: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, 2013 at 7:34
  • @green7 Thanks for your suggestion. I've posted my problem here with your solution. ^_^ Aug 2, 2013 at 2: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 2, 2019 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.

2
  • its worked, but restart is required after doing this for me.
    – Akhil S
    Jul 14, 2021 at 17:53
  • WTH is causing this? Lost all my shortcuts to an 10 year old bug (on 22.04) ...
    – UNeverNo
    Apr 18, 2022 at 19:19
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.

1
  • 2
    that's way too weird...
    – Braiam
    Sep 1, 2013 at 21:26
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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .