After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645403 - setting XDG_CONFIG_HOME doesn't work as expected
setting XDG_CONFIG_HOME doesn't work as expected
Status: RESOLVED WONTFIX
Product: dconf
Classification: Core
Component: writer
git master
Other Linux
: Normal normal
: ---
Assigned To: dconf-maint
dconf-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-21 14:30 UTC by Ivan Frade
Modified: 2011-05-10 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ivan Frade 2011-03-21 14:30:35 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.
Comment 1 Allison Karlitskaya (desrt) 2011-05-09 13:27:42 UTC
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.
Comment 2 Ivan Frade 2011-05-09 14:22:28 UTC
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)."
Comment 3 Allison Karlitskaya (desrt) 2011-05-10 13:28:30 UTC
Thank you for that.