! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
gnome-keyring-daemon not running even if "Launch gnome services" is checked.
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description the.hw.group 2009-03-22 16:57:27 CET
Red Hat Enterprise Linux 5.3 (RHEL)
32 bit
xfce4.6 (installed using the xfce4-4.6-installer.run from xfce.org)


I have a stored secret in gnome-keyring-manager for my wireless network, that works fine under gnome itself and even kde. In the previous release of xfce4 you could get gnome keyring (and a few good gnome applets) working by just going into  xfce4-settings-manager --> session and startup --> Advanced, and selecting "Launch GNOME services on startup".

This does not happen on startup, and I have verified that the checkbox is indeed checked. When I manually ran the 'gnome-keyring-manager' it reports that the gnome-keyring-daemon is not running. This makes me think that gnome services are not actually getting triggered by xfce. Again, when I test this by switching back to gnome, it works there.

I have no way of debugging this on xfce 4.6. This worked perfectly in the previous release.

Please let me know what I can gather for you to assist in resolution of this.
Comment 1 Brian J. Tarricone (not reading bugmail) 2009-03-22 19:01:18 CET
Olivier, since you worked on that code last, maybe you have an idea of what to look for?
Comment 2 Olivier Fourdan editbugs 2009-03-23 22:01:22 CET
Yes, this is to be expected, RHEL 5.3 is too old, there is no point in porting the code to deprecated gnome code.
Comment 3 Brian J. Tarricone (not reading bugmail) 2009-03-23 22:20:05 CET
Er, wasn't RHEL 5.3 released 2 months ago?
Comment 4 the.hw.group 2009-03-24 01:59:44 CET
@Brian --> That is correct, 5.3 was released about 2 months ago, and CentOS 5.3 will be out very soon as well.

@Olivier --> I would have to respectfully disagree with you sir. RHEL releases are stable "mature" releases of collective software. I have been a fan of xfce for years and even though it is my window manager environment of choice, ;-) I do my best to keep my Operating system as current as possible.

With that said, between the RHEL community and the CentOS communities which by the way is a large base of xfce users, there is even a xfce4.4 repository within centos extras and allot of users contributing to that repo, it is very much worth porting the code back to what RedHat RHEL / RHEL Desktop / CentOS considers a "mature" "stable" code / application base, per release.

I am not a programmer, however I am an avid professional QA tester, so in the sense of QA / testing I am able and willing to assist in whatever is involved in porting this back.
Comment 5 Forest 2010-05-19 04:14:26 CEST
I have the same problem on Ubuntu 10.04 (Lucid).  Furthermore, a message like this appears in ~/.xsession-errors:

Failed to run gnome-keyring-daemon: Failed to start child process « gnome-keyring-daemon » (No such file or directory)

This was reported on launchpad some time ago, prompting an ubuntu-specific patch that did the wrong thing:
https://bugs.launchpad.net/ubuntu/+source/xfce4-session/+bug/357346

I spent the past few nights diagnosing the problem, and believe I have it figured out.  There's new discussion here:
https://bugs.launchpad.net/ubuntu/+source/xfce4-session/+bug/564831

In short, there are several problems with gnome_keyring_daemon_startup() in xfce4-sesion:

1. It is calling g_spawn_sync() without an absolute path to the executable and without the G_SPAWN_SEARCH_PATH flag.

2. It is not passing the --start option when running gnome-keyring-daemon.  (See bug 5912.)

3. It is attempting to capture and export only one of the environment variables printed by gnome-keyring-daemon, and not doing it very smartly at that.  It should be capturing and setting all of them.

4. It looking for an existing gnome-keyring-daemon instance based on an environment variable that is no longer produced by the daemon.  It should be GNOME_KEYRING_CONTROL, not GNOME_KEYRING_SOCKET.

I have created a pair of patches to address these problems.  They're based on the current ubuntu versions of the code, but it doesn't look like this file has changed in xfce git since then.  You can find the patches on launchpad:

https://bugs.launchpad.net/ubuntu/+source/xfce4-session/+bug/564831
Comment 6 Olivier Fourdan editbugs 2010-05-19 09:02:04 CEST
(In reply to comment #5)
> I have the same problem on Ubuntu 10.04 (Lucid).  Furthermore, a message like
> this appears in ~/.xsession-errors:
> 
> Failed to run gnome-keyring-daemon: Failed to start child process «
> gnome-keyring-daemon » (No such file or directory)
>

I think this is totally different topics, this bugzilla was reported against EL5 which is shipping an old version of gnome (no matter how up-to-date EL is, this is not going to change).

The problem is that gnome-keyring starting keeps changing, I think it's now the third change and probably the best one, it's now using DBUS so it's not required to start it from the session anymore (I would expect Ubuntu 10.04 to use that version),

I ran into Fedora 13 bug https://bugzilla.redhat.com/show_bug.cgi?id=572137 which is now fixed and gnome-keyring works fine even (or better) when not started from the session manager.
Comment 7 Forest 2010-05-19 16:07:29 CEST
(In reply to comment #6)
> The problem is that gnome-keyring starting keeps changing, I think it's now the
> third change and probably the best one, it's now using DBUS so it's not
> required to start it from the session anymore (I would expect Ubuntu 10.04 to
> use that version),

As far as I can tell, it *is* required to start it from the session on Xfce, because starting it from DBus does not export gnome-keyring-daemon's environment variables and therefore leaves some programs (e.g. ssh) unable to find it.  If Xfce's session manager implemented the DBus interface that allowed gnome-keyring-daemon to set environment variables for the whole session, as GNOME's session manager does, *then* it would no longer be necessary to start it from the session.
Comment 8 Olivier Fourdan editbugs 2010-05-19 20:32:10 CEST
(In reply to comment #7)
> (In reply to comment #6)
> > The problem is that gnome-keyring starting keeps changing, I think it's now the
> > third change and probably the best one, it's now using DBUS so it's not
> > required to start it from the session anymore (I would expect Ubuntu 10.04 to
> > use that version),
> 
> As far as I can tell, it *is* required to start it from the session on Xfce,
> because starting it from DBus does not export gnome-keyring-daemon's
> environment variables and therefore leaves some programs (e.g. ssh) unable to
> find it.  If Xfce's session manager implemented the DBus interface that allowed

ssh needs gnome-keyring daemon?

> gnome-keyring-daemon to set environment variables for the whole session, as
> GNOME's session manager does, *then* it would no longer be necessary to start
> it from the session.

Are you sure of that?

I checked gnome session code some time ago and all code relative to starting gnome keyring daemon has been removed, see this commit:

    http://git.gnome.org/browse/gnome-session/commit/?id=e2403fa7393a7176b84d68a0ed6c7cd101494892

That occurred just before the gnome 2.24 branch point:

    http://git.gnome.org/browse/gnome-session/tag/?id=GNOME_2_24_BRANCHPOINT

Check by yourself, gnome-keying no more in gnome-session:

    http://git.gnome.org/browse/gnome-session/tree/gnome-session

The last occurrence I can find is from gnome 2.22:

    http://git.gnome.org/browse/gnome-session/tree/gnome-session?id=GNOME_SESSION_2_22_0

See log for gsm-keyring.c

    http://git.gnome.org/browse/gnome-session/log/gnome-session/gsm-keyring.c
Comment 9 Forest 2010-06-05 22:39:54 CEST
(In reply to comment #8)
> > As far as I can tell, it *is* required to start it from the session on Xfce,
> > because starting it from DBus does not export gnome-keyring-daemon's
> > environment variables and therefore leaves some programs (e.g. ssh) unable to
> > find it.  If Xfce's session manager implemented the DBus interface that allowed
> 
> ssh needs gnome-keyring daemon?

gnome-keyring-daemon provides several services, including an ssh agent that unlocks automatically at login and integrates with well with a gtk desktop.  

> > gnome-keyring-daemon to set environment variables for the whole session, as
> > GNOME's session manager does, *then* it would no longer be necessary to start
> > it from the session.
> 
> Are you sure of that?

It's documented here:

http://live.gnome.org/GnomeKeyring/RunningDaemon
"When used with a modern DBus capable session manager (like gnome-session
2.24.x and later) gnome-keyring-daemon will register environment variables
directly with the session manager."

Moreover, the behavior I observe matches the documentation.

> I checked gnome session code some time ago and all code relative to starting
> gnome keyring daemon has been removed,

I'm not saying that gnome session starts gnome-keyring-daemon.  I'm saying that gnome-keyring-daemon gives gnome session (via dbus) a list of environment variables to export to the session.  By doing so, programs run in that session (like ssh) can see those variables and use them to find gnome-keyring-daemon.  Since xfce4-session does not implement the dbus interface that allows environment variables to be exported through it, gnome-keyring-daemon needs another way to export its variables.  The only such way (AFAICT) is for gnome-keyring-daemon to be run at session startup and its printed output used to set those variables.
Comment 10 Forest 2010-06-05 23:09:18 CEST
Update:  A pair of patches has been submitted over at bug 5912.
Comment 11 Jérôme Guelfucci editbugs 2010-10-24 22:07:38 CEST
Fixed in git master.

Bug #5137

Reported by:
the.hw.group
Reported on: 2009-03-22
Last modified on: 2010-10-24

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
4 users

Version

Attachments

Additional information