#580156 gnome-keyring: tools unable to connect to the daemon

Package:
gnome-keyring
Source:
gnome-keyring
Description:
GNOME keyring services (daemon and tools)
Submitter:
"Marcin Szewczyk, Wodny"
Date:
2010-06-15 16:24:10 UTC
Severity:
normal
#580156#5
Date:
2010-05-03 22:20:54 UTC
From:
To:
After upgrading gnome-keyring from 2.28.2-1 to 2.30.0-2 I have problems with
various tools (mail-notification, gnome-keyring-manager). They are unable to
connect to the daemon.

After the upgrade I've done a test with gnome-keyring 2.22.3-2 and then
gnome-keyring-manager worked.

I can notice a difference in control socket directory structure and
environmental variables names (GNOME_KEYRING_*) between gnome-keyring versions.

ii  mail-notification                    5.4.dfsg.1-2.1
ii  gnome-keyring-manager                2.20.0-1

#580156#10
Date:
2010-05-04 06:33:03 UTC
From:
To:
Le mardi 04 mai 2010 à 00:20 +0200, Marcin Szewczyk, Wodny a écrit :

Don’t use testing for a desktop system. This bug has been fixed for a
week and those who use testing are still reporting it again and again.

#580156#11
Date:
2010-05-05 15:30:57 UTC
From:
To:
Which repo should I use then?

Now my package set looks like this:
ii  gnome-keyring                        2.30.1-2
ii  gnome-keyring-manager                2.20.0-1
ii  libgnome-keyring0                    2.30.0-2
ii  libpam-gnome-keyring                 2.30.1-2
ii  seahorse                             2.30.1-1
ii  mail-notification                    5.4.dfsg.1-2.1

The problem still exists. Is it going to disappear after updates of
packages other than gnome-keyring?

#580156#16
Date:
2010-05-08 20:28:10 UTC
From:
To:
Hello,

I just read this bug report and I have exactly the same kind of problem.
I have just updated my system.

I have tried in xfce and gnome.

Any suggestion ?

Regards
Sylvain Le Gall

#580156#21
Date:
2010-05-10 18:50:33 UTC
From:
To:
I have the same issue with Evolution, and I am unable to send any messages
via smtp.

I solved the issue by removing libpam-gnome-keyring. I no longer have the
errors with connecting to the security agent, and I am able to send mail.

I don't know if this is relavent or not, but system is a desktop
authenticating to a Samba PDC with open-ldap. - The server is Ubuntu 8.04.
Libpam-gnome-keyring didn't work to unlock the keyring for Evolution, but I
had not removed it until today.

Mark

#580156#22
Date:
2010-05-11 12:24:35 UTC
From:
To:
OK, I've made the keyring work, but still some part of the DBus,
gnome-keyring-daemon, tools family behaviour has changed.

I use Openbox so I haven't got gnome-session.

New versions of the mentioned applications seem to consider the
DBUS_SESSION_BUS_ADDRESS environmental variable important.

I've enabled /etc/xdg/openbox/autostart.sh during Openbox startup. This
launches dbus-launch which sets up the variable. Now everything works
fine.

#580156#27
Date:
2010-05-11 20:53:45 UTC
From:
To:
Removing libpam-gnome-keyring solve the problem. I use the same version
for libpam-gnome-keyring as gnome-keyring (see my former mail).

I reopen the bug because I think there is still a problem.

Regards
Sylvain Le Gall

#580156#34
Date:
2010-05-11 21:15:48 UTC
From:
To:
Removing libpam-gnome-keyring didn't help in my case.

I've tested the thing with gnome-session for a couple of minutes. It
worked in that configuration. So I started unsetting environmental
variables. Seahorse stopped connecting do the keyring after unsetting
DBUS_SESSION_BUS_ADDRESS.

#580156#39
Date:
2010-05-12 14:42:54 UTC
From:
To:
Le mardi 11 mai 2010 à 23:15 +0200, Marcin Szewczyk a écrit :

Of course it would, since programs accessing the keyring use D-Bus to
connect to the daemon.

The real problem if you don’t use a session manager is that the daemon
itself is not started at login time. AIUI it is only pre-loaded by the
PAM module, and if the daemon is not started a few seconds after, it
exits and the password information is lost.

Cheers,

#580156#44
Date:
2010-05-12 15:22:38 UTC
From:
To:
I don't think it's so obvious. Previously everything worked fine without
exporting the DBUS_SESSION_BUS_ADDRESS variable during Openbox startup.

dbus-launch man states:
If  DBUS_SESSION_BUS_ADDRESS  is not set [...] or find the existing bus
address on the X display or in a file in ~/.dbus/session-bus/.

So there are other mechanisms of finding a DBus session bus. For example
the d-feet tool has to do it somehow.

Now it works without the PAM module. It was obsolete as the new version
seems not to add itself to common-session in pam.d anymore.

I admit - now I start gnome-keyring-daemon during Openbox startup, but
for another reason - to avoid dangling daemon processes executed on
every connection request.

Without launching gnome-keyring-daemon during Openbox startup everything
still works, but after killing X server I have daemons still running.
When a tool needs a keyring a daemon process starts.

The password information is unimportant here. The problem wasn't with
connecting to a locked keyring but in connecting itself.
Without the PAM module the keyring just doesn't get unlocked during
login. But first access to the keyring ends with a dialog asking me for
the keyring password. After supplying it the keyring is unlocked and
tools work as usual.

#580156#49
Date:
2010-06-14 18:53:28 UTC
From:
To:
Josselin Mouette wrote:

Is it agreed that a session manager must set DBUS_SESSION_BUS_ADDRESS?
XFCE doesn't do so, meaning that everything using Gnome Keyring breaks
in XFCE.  (Example: Network Manager forgets passwords, #578587.)

#580156#54
Date:
2010-06-15 07:01:01 UTC
From:
To:
Le lundi 14 juin 2010 à 14:53 -0400, John Lindgren a écrit :

This is set by the startup scripts in dbus-x11, not by the session
manager itself. The only difference between GNOME and Xfce on this
matter is that gnome-session will start the D-Bus daemon even if it has
been disabled.

Cheers,

#580156#59
Date:
2010-06-15 14:58:03 UTC
From:
To:
Here is the content of /etc/X11/Xsession.d/75dbus_dbus-launch on my
system.  Am I right in saying that dbus-launch prints the variables that
need to be set to stdout, and expects the session manager to set them?
If so, it seems that xfce4-session is dropping the ball here.

#580156#64
Date:
2010-06-15 15:20:18 UTC
From:
To:
Le mardi 15 juin 2010 à 10:58 -0400, John Lindgren a écrit :

No, dbus-launch will pass the environment to the session. From
dbus-launch(1):

       With  no  arguments, dbus-launch will launch a session bus instance and
       print the address and pid of that instance to standard output.

       You may specify a program to be run; in  this  case,  dbus-launch  will
       launch  a  session  bus instance, set the appropriate environment vari‐
       ables so the specified program can find the bus, and then  execute  the
       specified  program,  with the specified arguments.

#580156#69
Date:
2010-06-15 16:23:12 UTC
From:
To:
Okay, I was confused about the Xsession.d scripts.  I thought
x-session-manager would run them (as gnome-session seems to), but I
guess it is the other way around -- they are meant to run
x-session-manager.  If I run /etc/X11/Xsession instead of
x-session-manager, then dbus-launch starts before x-session-manager
(instead of after) and passes the environment variables to it.