GNOME Bugzilla – Bug 645403
setting XDG_CONFIG_HOME doesn't work as expected
Last modified: 2011-05-10 13:28:30 UTC
In a environment without any special XDG_CONFIG_HOME, everything works as expected: $ unset XDG_CONFIG_HOME $ env |grep XDG_CONFIG_HOME $ gsettings get org.freedesktop.Tracker.Miner.Files throttle 3 $ gsettings set org.freedesktop.Tracker.Miner.Files throttle 5 $ gsettings get org.freedesktop.Tracker.Miner.Files throttle 5 But when XDG_CONFIG_HOME is set, the writings are not working anymore: $ mkdir /home/ivan/tmp-xdg-config/dconf $ export XDG_CONFIG_HOME=/home/ivan/tmp-xdg-config/ $ gsettings get org.freedesktop.Tracker.Miner.Files throttle 0 $ gsettings set org.freedesktop.Tracker.Miner.Files throttle 5 $ gsettings get org.freedesktop.Tracker.Miner.Files throttle 0 I think this is because the writing daemon is autostarted by DBus (ignoring the variables set in the terminal). Actually starting the daemon manually in that terminal everything works as expected. I don't know if the daemon should/can respect XDG_CONFIG_HOME at all, or where should it save the data, but the set/get should work.
I don't reasonably think that we can support this because doing so would mean that the dconf service has to be willing to write to arbitrarily-specified locations. I don't really want that. In general, I don't think it can be expected to work that you run a login session with different XDG_CONFIG_HOME variables per session.
I have added a mention about this in the wiki page. http://live.gnome.org/dconf/SystemAdministrators "Note that XDG_CONFIG_HOME cannot be set/modified per terminal or session (E.G. export XDG_CONFIG_HOME=...), because then the writer and reader would be working on different DBs (the writer is started by DBus and cannot see that variable)."
Thank you for that.