Ubuntu – Messed up desktop and other folders

14.04guiiconsnautilusunity

This screen is riddle with these folders which i dont want here

Recently i made an attempt to rename Desktop to desktop..and messed up some things.When i try to remove these folders from here..they get deleted from home directory.

Following is screenshot of home directory

enter image description here

I want only the folder sridhar in the opening screen.When i click the folder icon..(top left) desktop option should be there inside that..in those icons in left(below home and above documents)

Any help would be much appreciated!

EDIT: After running the command on andrew's answer
enter image description here

enter image description here

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

After changing

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

Best Answer

Your ~/.config/user-dirs.dirs file has some incorrect settings, in particular you have lost the correct setting for 'DESKTOP'. Possibly others have been changed as well and may need some editing, (the contents of your ~/.config/user-dirs.dirs file will reveal this).

My own ~/.config/user-dirs.dirs file is as follows:

andrew@ithaca:~$ cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
andrew@ithaca:~$ 

You can certainly edit the file directly as is suggested above but another way to correct the missing entries in your own file is to run the following commands one after the other from a Terminal window:

xdg-user-dirs-update --set DESKTOP "$HOME/Desktop"
xdg-user-dirs-update --set DOWNLOAD "$HOME/Downloads"
xdg-user-dirs-update --set TEMPLATES "$HOME/Templates"
xdg-user-dirs-update --set DOCUMENTS "$HOME/Documents"
xdg-user-dirs-update --set PICTURES "$HOME/Pictures"
xdg-user-dirs-update --set VIDEOS "$HOME/Videos"

Then logout and subsequently login or simply reboot, and all should be well. For reference here are all of the values that can be manipulated in this way:

DESKTOP
DOWNLOAD
TEMPLATES
PUBLICSHARE
DOCUMENTS
MUSIC
PICTURES
VIDEOS

The commands I have given you should return you to the defaults, and to remove the $HOME icon from the Desktop:

gsettings set org.gnome.nautilus.desktop home-icon-visible false

References:

Related Question