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 616861 - Error communicating with gnome-keyring-daemon
Error communicating with gnome-keyring-daemon
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-04-26 16:23 UTC by ofir aviram
Modified: 2011-03-01 09:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch which initialized DBus again if first time fails (2.74 KB, patch)
2011-01-19 21:07 UTC, Stef Walter
none Details | Review

Description ofir aviram 2010-04-26 16:23:47 UTC
i have a problem for some time now that when i open empathy it asks me to enter my accounts again and when i go and check at seahorse i see this message in the bottom of the windows.

when i recently installed Ubuntu RC i set password for my key ring but later i set it as unsafe storage because empathy keep asking me for password when i opened it because when i installed Ubuntu i set auto login and not the default option.

the reason i did that is because i'm the sole user of this computer the question is what exactly is causing the problem is it the unsafe storage that is buggy or is it something else that is causing the problem that seahorse is showing?

When i try to create a new password i also get this error "Error communicating with gnome-keyring-daemon"

the problem usually fix itself after restart but returns again later.

What ever information you need just tell and thanks in advance.

you can read everything here:
https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/569667
Comment 1 Forest 2010-05-18 08:36:18 UTC
I recently upgraded from Xubuntu 9.10 (Karmic) to 10.04 (Lucid), and ran into the same error: programs like 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-keyring.

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

- On my system, 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.

- Subsequent runs of gnome-keyring-daemon didn't seem to publish themselves via dbus, perhaps because they noticed that gnome-keyring-daemon --start had already been run.

- I had configured my system to initialize gnome-keyring-daemon in ~/.xprofile in order to capture and export the environment variables that it prints, which are necessary for features like ssh agent.

- On Xfce, the environment variables were not getting automatically exported to the session environment because Xfce's session manager doesn't implement the dbus environment variable setting mechanism that GNOME's session manager does.

If my guesses above are correct, (they're based on observation, not any knowledge of the GNOME code) I would suggest these changes for the sake of robustness:

- Make libgnome-keyring fall back to the old method of finding the daemon (via environment variables), in case the daemon is running but wasn't able to announce itself on dbus.

- When gnome-keyring-daemon detects that another instance is already running, make it smart enough to announce the first instance on dbus (if that wasn't done already).
Comment 2 Stef Walter 2010-09-11 21:07:43 UTC
Yes Forest, mostly correct.

But why are you starting gnome-keyring-daemon from ~/.xprofile?

In general only way gnome-keyring-daemon should be started from outside of a DBus session is from the PAM module, which uses the --login option. The --login option causes gnome-keyring-daemon to wait for later initialization, when a DBus session is available.
Comment 3 Forest 2010-11-02 04:13:03 UTC
I'm running it from ~/.xprofile to do the later initialization that you mentioned, and to capture and set the environment variables printed by gnome-keyring-daemon --start.  (GNOME session manager seems to implement a proprietary DBus service to get the environment variables set, but XFCE has no such thing, so an alternate way is necessary.)
Comment 4 Stef Walter 2011-01-19 21:07:11 UTC
> - Make libgnome-keyring fall back to the old method of finding the daemon 
> (via environment variables), in case the daemon is running but wasn't able
> to announce itself on dbus.

Sadly this doesn't work because the old method of communication no longer exists. So although it may be able to find the daemon, it wouldn't be able to communicate with it.
Comment 5 Stef Walter 2011-01-19 21:07:50 UTC
Created attachment 178781 [details] [review]
Patch which initialized DBus again if first time fails

Does this patch fix your problem. Let me know and I'll include it in gnome-keyring.
Comment 6 Stef Walter 2011-03-01 09:15:24 UTC
No response. Merged anyway, since this is a good change.