3

Background

I'm running Linux Mint 17 Cinnamon. After a botched attempt at migrating my data to a NAS, I restored my data from an external USB.

Problem Statement

After restoring from backup, all my files seem to be back the way they were before I started migrating to NAS, except that my desktop no longer shows the contents of ~/Desktop. Instead, it shows links to all the other folders in my home (Documents, Downloads, Music, Pictures, etc). The same problem happens when I open my file manager and choose Desktop under My Computer on the left - it shows the other folders in my home as well.

I can see that the Desktop folder is present in my ~.

scott@dell-mint-17 ~ $ ls -l
total 8
lrwxrwxrwx 1 scott scott   17 Dec 17 08:25 Desktop -> /mnt/data/Desktop
lrwxrwxrwx 1 scott scott   19 Sep 23 21:17 Documents -> /mnt/data/Documents
lrwxrwxrwx 1 scott scott   19 Sep 23 21:17 Downloads -> /mnt/data/Downloads
lrwxrwxrwx 1 scott scott   17 Oct 11 13:07 Dropbox -> /mnt/data/Dropbox
lrwxrwxrwx 1 scott scott   15 Sep 23 21:18 Music -> /mnt/data/Music
lrwxrwxrwx 1 scott scott   18 Sep 23 21:18 Pictures -> /mnt/data/Pictures
drwxr-xr-x 2 scott scott 4096 Sep 18 08:25 Public
drwxr-xr-x 2 scott scott 4096 Sep 18 08:25 Templates
lrwxrwxrwx 1 scott scott   16 Sep 23 21:18 Videos -> /mnt/data/Videos
lrwxrwxrwx 1 scott scott   24 Oct 11 13:06 VirtualBox VMs -> /mnt/data/VirtualBox VMs

I can also see that ~/Desktop contains only two files, which aren't displayed:

scott@dell-mint-17 /mnt/data/Desktop $ ls -la
total 20
drwxr-xr-x  2 scott scott 4096 Oct 11 09:44 .
drwxr-xr-x 22 scott scott 4096 Oct 11 13:47 ..
-rwxr-xr-x  1 scott scott  279 Sep 19  2013 Exact Audio Copy.desktop
-rw-rw-r--  1 scott scott  752 Sep 19  2013 Exact Audio Copy.lnk
-rw-rw-r--  1 scott scott   91 Dec 23  2013 rsync~

Question

My questions are: Why isn't my desktop showing things that are actually in my Desktop folder, and how do I fix this?

Things I've already tried

I've already tried resetting the Cinnamon desktop by deleting the file that stores the desktop settings (/home/scott/.config/dconf/user) and rebooting, per one user's suggestion for another problem on Linux Mint Forums: "After crash not displaying desktop". I've also tried removing the symlink, creating it again, and hitting F5, but that didn't solve the problem, either.

I've searched other questions - Linux Mint - Just created launcher does not show on MATE desktop but is in ls listing and Why are my application.desktop files not showing up in Linux application menu? - neither of these addresses my specific issue (or if they do, then I wasn't able to connect the dots).

  • What does ~/.config/user-dirs.dirs contain, if this file exists? If you create a new file in your home directory, does it appear on your graphical desktop? – Gilles Dec 17 '14 at 22:48
  • Aha! It had contained XDG_DESKTOP_DIR="$HOME". After changing it to XDG_DESKTOP_DIR="$HOME/Desktop" and rebooting, my Desktop displays the files from ~/Desktop now. Thank you so much! Do you want to add this as an answer? – Scott Dec 18 '14 at 13:12
2

Under Freedesktop-compliant desktop environments, including Cinnamon, Gnome, KDE, Xfce, etc., the desktop shows the content of the directory ~/Desktop by default. This location can be changed by editing the file ~/.config/user-dirs.dirs and changing the XDG_DESKTOP_DIR setting. Other settings in this file include the downloads directory (XDG_DOWNLOAD_DIR), the music directory (XDG_MUSIC_DIR), etc. If a setting is missing or the file doesn't exist, a default name in the home directory is used (~/Desktop, ~/Downloads, ~/Music, etc.). See the Arch Wiki and the Freedesktop documentation for more information.

It appears that your desktop is showing the contents of your home directory, which in the shell can be represented by "$HOME" or by the character ~. This presumably indicates that you have a file ~/.config/user-dirs.dirs with the setting XDG_DESKTOP_DIR="$HOME". If that's the case, change it to XDG_DESKTOP_DIR="$HOME/Desktop". I think you have to log out and back in in order for this change to take effect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.