! 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 !
add support for newer versions of gnome-keyring that require a '--start' para...
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-session
Component:
General

Comments

Description Forest 2009-10-27 01:53:43 CET
I'm using xfce on xubuntu 9.04 (Jaunty).  Although I have "Launch GNOME services on startup" checked, gnome-keyring-daemon isn't fully initialized.  I can see from a ps command that it was run as "gnome-keyring-daemon --login", which starts the daemon but only does part of the job.  In order to fully initialize it, "gnome-keyring-daemon --start" must be run, and the environment variables it prints must get set (so that command line programs like ssh can find the daemon).  See the Gnome Keyring docs for details:
http://live.gnome.org/GnomeKeyring/RunningDaemon

It has been suggested (in another bug report) that xfce might still be using the startup semantics for an old version of gnome-keyring-daemon.  In that case, please update it to work with the version that now ships with xubuntu.

Thanks!
Comment 1 Brian J. Tarricone (not reading bugmail) 2009-10-27 04:07:14 CET
As I said in the other bug, I don't personally use gnome-keyring, so likely we'll have to rely on a patch from someone else to add support for this.
Comment 2 Forest 2010-05-19 04:21:10 CEST
I dug deeper into this due to some related xubuntu bug reports.  (See also bug 5137.)  It turns out 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 spawning gnome-keyring-daemon.

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 is 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 xfsm-compat-gnome.c has changed in xfce git since then.  You can find the patches on launchpad:

https://bugs.launchpad.net/ubuntu/+source/xfce4-session/+bug/564831

10_spawn-gnome-keyring-daemon-with-path.patch
11_export-gnome-keyring-daemon-variables.patch
Comment 3 Luca Niccoli 2010-05-31 12:43:01 CEST
Created attachment 3002 
spawn gnome-keyring with path
Comment 4 Luca Niccoli 2010-05-31 12:43:59 CEST
Created attachment 3003 
Don't check for running gnome-keyring; launch it with --start and correctly export variables
Comment 5 Luca Niccoli 2010-05-31 12:48:30 CEST
Hi,

gnome-keyring-daemon exports GNOME_KEYRING_CONTROL even if it's started by pam with --login; but it still needs to be initialized.
Any way, gnome-keyring-daemon --start is idempotent after the first time, so we can run it without caring if it's already running.

I'm using xfce4-session with the two attached patches (derived from the ones on the ubuntu bug report), and gnome-keyring works both as a ssh agent and as a password manager (the DBus interface is present and all the variables are exported).

Cheers,

Luca
Comment 6 Jérôme Guelfucci editbugs 2010-09-29 09:26:34 CEST
*** Bug 6693 has been marked as a duplicate of this bug. ***
Comment 7 Jérôme Guelfucci editbugs 2010-10-24 22:08:07 CEST
I pushed the patches to git master, thanks a lot for your work.

Bug #5912

Reported by:
Forest
Reported on: 2009-10-27
Last modified on: 2010-10-24
Duplicates (1):
  • 6693 compat-gnome is not exporting gnome-keyring-daemon variables

People

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

Version

Attachments

Additional information