Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 @@
 # 
 XDG_PUBLICSHARE_DIR="$HOME/public"
 XDG_TEMPLATES_DIR="$HOME/public/template"
-
 XDG_DESKTOP_DIR="$HOME/private/desktop"
 XDG_DOCUMENTS_DIR="$HOME/private/doc"
 XDG_PICTURES_DIR="$HOME/private/picture"
 XDG_MUSIC_DIR="$HOME/private/music"
 XDG_VIDEOS_DIR="$HOME/private/video"
-
-XDG_DOWNLOAD_DIR="$HOME/var/downloads"
+XDG_DOWNLOAD_DIR="$HOME/"

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

2 Answers 2

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

 
discard

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.