Opened 7 years ago

Closed 7 years ago

#9790 closed defect (fixed)

Setting XDG_RUNTIME_DIR in /etc/profile breaks gnome-keyring autologin

Reported by: Wayne Blaszczyk Owned by: bdubbs@…
Priority: normal Milestone: 8.2
Component: BOOK Version: SVN
Severity: normal Keywords: systemd pam gnome-keyring
Cc:

Description (last modified by Wayne Blaszczyk)

This is the error I get in the system journal (B/LFS 8.1 systemd + GNOME 3.26.0)"

Sep 20 19:10:21 jupiter gnome-keyring-daemon[717]: couldn't access control socket: /tmp/xdg-wblaszcz/keyring/control: No such file or directory
Sep 20 19:10:21 jupiter gnome-keyring-daemon[719]: couldn't access control socket: /tmp/xdg-wblaszcz/keyring/control: No such file or directory
Sep 20 19:10:21 jupiter gnome-keyring-d[717]: couldn't access control socket: /tmp/xdg-wblaszcz/keyring/control: No such file or directory
Sep 20 19:10:21 jupiter gnome-keyring-d[719]: couldn't access control socket: /tmp/xdg-wblaszcz/keyring/control: No such file or directory
Sep 20 19:10:21 jupiter gnome-keyring-ssh.desktop[714]: SSH_AUTH_SOCK=/tmp/xdg-wblaszcz/keyring/ssh

The is the equivalent entry on a working build (B/LFS 8.0 systemd + GNOME 3.24.x) :

Sep 20 17:20:22 jupiter gnome-keyring-ssh.desktop[705]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Sep 20 17:20:22 jupiter gnome-keyring-secrets.desktop[707]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh

Turns out that SSH_AUTH_SOCK is derived from XDG_RUNTIME_DIR. Turns out that XDG_RUNTIME_DIR is set by default through pam_systemd. Looks like /etc/profile is overwriting this variable.

Change History (8)

comment:1 by Wayne Blaszczyk, 7 years ago

Description: modified (diff)

comment:2 by Wayne Blaszczyk, 7 years ago

As a side note, by commenting out all 3 XDG variables from /etc/profile, all 3 variables are still set by other unknown means after a reboot.

comment:3 by bdubbs@…, 7 years ago

Another case where the systemd folks know better than the user.

I suppose we can use:

export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}

See if that works for you.

Last edited 7 years ago by bdubbs@… (previous) (diff)

comment:4 by DJ Lucas, 7 years ago

I was going to cite portability, but it does work in dash and zsh, so it won't break anything in the book. No longer have AST stuff to test with.

comment:5 by Wayne Blaszczyk, 7 years ago

The above works fine for me.

comment:6 by bdubbs@…, 7 years ago

We can make that change, but it really does seem highly inappropriate for something to set bash environment variables BEFORE the first bash configuration file (/etc/profile).

comment:7 by bdubbs@…, 7 years ago

Owner: changed from blfs-book@… to bdubbs@…
Status: newassigned

comment:8 by bdubbs@…, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed at revision 19282.

Note: See TracTickets for help on using tickets.