Comment 18 for bug 569667

Forest (foresto) wrote :

I recently upgraded from Xubuntu Karmic to Lucid, and ran into the same error: both nm-applet and seahorse were failing to contact gnome-keyring-daemon. After a lot of investigation, I'm starting to think I know what's going on:

- Seahorse, nm-applet, and probably a lot of other components contact gnome-keyring-daemon through libgnome-keyring0.

- (I'm guessing on this one.) Recent versions of libgnome-keyring0 seem to have begun looking for gnome-keyring-daemon exclusively via dbus, ignoring environment variables like GNOME_KEYRING_CONTROL and GNOME_KEYRING_PID.

- gnome-keyring-daemon was unable to publish itself via dbus, because it was initialized (run with the --start option) in ~/.xprofile, which gets run before dbus has started.

- I had configured my system to initialize it in ~/.xprofile in order to capture and export the environment variables that it prints, which are necessary for features like ssh agent.
http://live.gnome.org/GnomeKeyring/Ssh
http://live.gnome.org/GnomeKeyring/RunningDaemon

- The environment variables weren't getting captured and exported because someone patched the ubuntu xfce-session package to disable that functionality, in a misguided attempt to fix another problem. See bug 357346. (On Xfce, the environment variables are not automatically exported to the session environment, because Xfce's session manager doesn't implement the environment variable setting mechanism that GNOME's session manager does. Therefore, capturing the printed environment variables is the only way to make sure they get set.)

I suggest the original bug reporter try to figure out where gnome-keyring-daemon is being started, and whether there are multiple copies of it running. If it gets run with the --start option before dbus is running, even if it is later run again (perhaps with --components=pkcs11), every program that uses libgnome-keyring0 may be unable to reach it. If you don't need support for older client programs or the SSH agent feature, or if you're running GNOME and not Xfce, you can probably safely remove whatever is launching it early and let the *.desktop scripts in /etc/xdg/autostart handle it instead.