Skip to content

Changing the Desktop Folder | Linux

2010 April 24
by jithinkr

First, let me tell you what let me to find this out. About what this is, you’ll soon know.

My friend borrowed my laptop, to try out OS codes for her OS lab examination. When she returned the laptop after a couple of days, I noticed that, my Desktop had moved! Yes, instead of the normal /home/jithinkr/Desktop/ it was now pointing to /home/jithinkr/Codes/Desktop/!

I tried moving the Desktop back to where it was supposed to be, but in my attempts, I ended up deleting all the files I had on my Desktop! Well, that indeed was a big loss, because I had forgotten what all files were there on my desktop. (Though the shell and the locate command came in handy to remind me what those files where. Wish I knew some way to recover them. :(  ).

Now my Desktop was pointing to /home/jithinkr and hence all the Documents, Pictures and Videos folders were being displayed on the Desktop.

This was something I never expected to happen .

After some surfing, I came to know of the file, where all these paths are configured. It’s here :

/home/<username>/.config/user-dirs.dirs

The content of this files was :

# 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”
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”
Changing the XDG_DESKTOP_DIR variable’s value to “$HOME/Desktop” and creating a Desktop folder in /home/jithinkr/ and a re login saved me from my dilemma!
So if you are of the habit of not storing your Pictures and Videos in these default folders, then just change it here and then , you can easily access your folders from the Pictures and Videos bookmark!!

Blog Widget by LinkWithin

Technorati Tags: , , ,

  • http://vakarthik.com/ Karthik

    hey! nice one dude