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 686934 - Keyring ignores XDG_DATA_HOME environment variable
Keyring ignores XDG_DATA_HOME environment variable
Status: RESOLVED OBSOLETE
Product: gnome-keyring
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-26 11:43 UTC by Simonas Kazlauskas
Modified: 2021-06-18 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Waits for XDG_DATA_HOME environment variable (580 bytes, patch)
2012-10-26 15:08 UTC, Simonas Kazlauskas
none Details | Review

Description Simonas Kazlauskas 2012-10-26 11:43:59 UTC
Even tough I have set XDG_DATA_HOME to ~/local/share, keyring insists on keeping its files in ~/.local/share.

`GLib.get_user_data_dir()` returns `~/local/share` both in Python and Looking Glass.

Environment variable is set by /etc/profile.d/xorg.sh
Comment 1 Stef Walter 2012-10-26 12:23:59 UTC
Good point. I think that GKD_UTIL_IN_ENVIRONMENT[] in daemon/gkd-util.c needs patching for that variable. Are you interested in and able to make a patch?
Comment 2 Simonas Kazlauskas 2012-10-26 14:20:48 UTC
I could make it, but before that I'd need to get to know GNOME build and testing systems so I could test/build my patch. If there's anyone who's willing to make a patch and has needed tools already set up, I'd be grateful.
Comment 3 Simonas Kazlauskas 2012-10-26 15:08:07 UTC
Created attachment 227367 [details] [review]
Waits for XDG_DATA_HOME environment variable

Oh, I did it old style – by recompiling system package and restarting to see if it's working. Seems to work correctly – deleted .local directory doesn't appear again.
Comment 4 Stef Walter 2012-10-26 19:24:03 UTC
Thanks. Pushed to gnome-keyring 3.6.x branch, so this will be included in
3.6.2. Will also make its way to git master eventually.
Comment 5 Carl George 2014-03-19 13:00:11 UTC
As best I can tell, this is still a bug as of version 3.10.1.

$ pacman -Q gnome-keyring
gnome-keyring 3.10.1-2
$ echo ${XDG_DATA_HOME}
/home/carl/.xdg/data
$ ll /home/carl/.xdg/data/keyrings
ls: cannot access /home/carl/.xdg/data/keyrings: No such file or directory
$ ll /home/carl/.local/share/keyrings
total 8.0K
drwx------ 1 carl carl   52 Mar 19 07:54 ./
drwx------ 1 carl carl   16 Feb 27 07:31 ../
-rw------- 1 carl carl 1.3K Mar 18 08:12 login.keyring
-rw------- 1 carl carl  207 Feb 27 07:31 user.keystore
Comment 6 Carl George 2014-04-22 15:32:40 UTC
Related bug: https://bugzilla.gnome.org/show_bug.cgi?id=613644

This has been fixed.  The trick is that gnome-keyring is started by PAM before the files in /etc/profile.d/ are sourced.  I resolved the issue by setting full paths for XDG variables in my user's pam environment file.

$ cat ~/.pam_environment
XDG_CONFIG_HOME=/home/carl/.xdg/config
XDG_CACHE_HOME=/home/carl/.xdg/cache
XDG_DATA_HOME=/home/carl/.xdg/data
Comment 7 Kevin Krumwiede 2016-11-06 07:23:27 UTC
This is still bugged in version 3.18.3 on Ubuntu 16.04.  The workaround suggested in comment #6 does not work.
Comment 8 André Klapper 2021-06-18 10:40:07 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/

Thank you for your understanding and your help.