Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Each time I changed and saved .config/user-dirs.dirs, and after restarted the system, the XDG_DOWNLOAD_DIR are reverted:

diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs
index 8f6e2db..dcff34e 100644
--- a/.config/user-dirs.dirs
+++ b/.config/user-dirs.dirs
@@ -7,11 +7,9 @@

How to make my changes permanent?

share|improve this question
What do you want to do? Add dirs to places? If so have a look at ~/.gtk-bookmarks – Rinzwind Jun 13 '11 at 8:12
@Rinzwind: I want to set the default download dir to $HOME/var/downloads, permanently. – Xiè Jìléi Jun 13 '11 at 15:21
up vote 2 down vote accepted

See xdg-user-dirs in Ubuntu Software Center:

It sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs. Change the default directories and their initial values in /etc/xdg/user-dirs.defaults. The values are relative pathnames from the home directory.

share|improve this answer

I think this is the proper way to do it:

xdg-user-dirs-update --set DOWNLOAD $HOME/var/downloads
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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