You are not logged in.

#1 2015-04-11 05:30:00

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

gnome-keyring and gnome-screensaver do not work until restarted

I have a strange problem, this file is executed by lxdm after user login (via PostLogin hook):

#!/bin/bash

gnome-screensaver &

eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK

Yet, more often than not I need to kill gnome-keyring-daemon and gnome-screensaver to make them work.
What can possibly be the cause?

I checked the journalctl -b log and all seems normal, what should I look for? Any insight?

Offline

#2 2015-04-15 03:15:05

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: gnome-keyring and gnome-screensaver do not work until restarted

There must be some race condition I am totally unaware of. Just adding a sleep 3s before the executions solved the problem.

Offline

#3 2015-04-15 10:55:29

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 653

Re: gnome-keyring and gnome-screensaver do not work until restarted

Related issue https://bbs.archlinux.org/viewtopic.php?id=196068. See comments about SSH_AUTH_SOCK there.

Offline

#4 2015-04-16 03:01:34

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: gnome-keyring and gnome-screensaver do not work until restarted

Sounds dead-on. That would explain why waiting 3 seconds solves the problem, LXDM is too fast executing the hook and SSH_AUTH_SOCK still points to /tmp.

Offline

#5 2015-06-10 01:30:58

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: gnome-keyring and gnome-screensaver do not work until restarted

I tried adding this code, but it does not work...  How to detect the env variable is ready?

while [[ "$SSH_AUTH_SOCK" =~ "/tmp" ]] ;do
    sleep 1
done

Offline

Board footer

Powered by FluxBB