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?
I think this is the proper way to do it:
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.Create
.config/user-dirs.conf
:You could see the explanation on
/etc/xdg/user-dirs.conf
I know this is an old thread, still I think I can share something that might be relevant, as this helped me greatly.
Instead of dealing with XDG and configs, it is possible to create a symlink for all the user-folders that are in $HOME, which also makes it easier for some programs to find the path, as some programs fx. point to the $HOME/Music directory, and if they can't find that music folder, they just point to $HOME (bummer).
By creating a symlink, it's possible to circumvent this problem, and then the programs searching for $HOME/Music will find it, but all that happens in $HOME/Music, will be stored at another place.
Lets assume your username is "John", then this is what needs to be done:
Target folder can be the desired location of Music, fx. on an attached drive with the number JHG76H, and folder that should point to Music can be a default music folder in home, like this:
Change the paths according to needs, as this was just a pseudo drive number and username, and in my experience, this can be used for pretty much any drive or folder location, as long as there is access. Doing this didn't alter the content in target folder for me (as expected), but still use with caution.
PS: $HOME is another way of writing /home/YourUserName