3

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/"
0

2 Answers 2

3

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:

9
  • Hey i ran the command you guy..and have updated the answer Feb 21, 2016 at 9:22
  • OK I have edited my answer to also patch up the other errant pathways and hopefully all will be well now :).
    – andrew.46
    Feb 21, 2016 at 9:37
  • Hey i have updated in the file itself seeing your earlier post.All is well now except one thing..the home folder and documents folder show up in the start screen..i cant seem to remove them from there Feb 21, 2016 at 9:40
  • I have also updated my post with a few extra commands that should hopefully fix this as well :)
    – andrew.46
    Feb 21, 2016 at 9:42
  • Hey the home folder is still there in my front screen..not able to remove Feb 21, 2016 at 9:48
0
sudo mkhomedir root
sudo xdg-user-dirs-update --force # (optional)

For root directories

sudo mkhomedir_helper $USER
xdg-user-dirs-upate --force

For current user

This differ from the previous answers by not typing one by one directories (Downloads Documents, etc...) You can avoid

sudo xdg-user-dirs-update --force

For root as long there is no Downloads, Documents, etc for root user. Edited as suggested @MarcVanhoomissen

1
  • Good start. I recommend to explain how this differs from the accepted answer. Some words of explanation would also be usefull. Oct 16, 2023 at 8:48

You must log in to answer this question.

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