! 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 !
Please make xfce4-session support DBus requests to register environment varia...
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce4-session
Component:
General

Comments

Description Forest 2009-10-23 03:01:31 CEST
Daemons which need to register environment variables for an entire X session, such as SSH agents and keyring daemons, have traditionally only been able to do so if they were inserted into an X session startup script.  This can be a real hassle, depending on a user's knowledge of such scripts (many users have no clue about how to work with these) and/or the complexity of those scripts on any given system (distributions like xubuntu have a bunch of them which makes the startup sequence somewhat hard to understand).

Some more modern daemons like gnome-keyring-daemon can set their variables by communicating with the session manager directly, which is a lot more convenient for users.  Here's a blurb from the Gnome Keyring docs:

"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."
http://live.gnome.org/GnomeKeyring/RunningDaemon

I have tried this with xfce4-session, and it didn't work.  I'm assuming that means XFCE's session manager doesn't support those dbus requests.  It would be nice if it did.
Comment 1 Brian J. Tarricone (not reading bugmail) 2009-10-23 16:47:50 CEST
I'm not sure about this.  I never liked this approach, and frankly I don't want to encourage people to use environment variables for this sort of thing in their apps, because it's just a bad idea (mostly for the reasons you're talking about).

There's no actual standard for this, beyond GNOME's non-standard standard.  I'd rather not just implement something that may or may not be a stable interface.
Comment 2 Forest 2009-10-24 01:44:16 CEST
> I don't want
> to encourage people to use environment variables for this sort of thing in
> their apps, because it's just a bad idea (mostly for the reasons you're talking
> about).

And yet, for apps like ssh, using environment variables to find services is practically unavoidable.  (The environment variable interface is entrenched and alternatives are unlikely to be portable.)

> There's no actual standard for this, beyond GNOME's non-standard standard.  I'd
> rather not just implement something that may or may not be a stable interface.

Yeah, I hear you.  I think I'd prefer a freedesktop spec, if there was one.
Comment 3 Brian J. Tarricone (not reading bugmail) 2009-10-24 03:12:46 CEST
Well, xinitrc already starts up ssh-agent (and xfce-utils in git master will do gpg-agent too, and they're configurable through xfconf).  I know it's not the ideal place for things like that, but it works, and most people won't need to fiddle with those particular apps.
Comment 4 Forest 2009-10-24 03:20:59 CEST
Yes, I noticed ssh-agent in the startup scripts.  Unfortunately, ssh-agent doesn't know how to retrieve an ssh key's passphrase from an already-unlocked keyring, so I use gnome-keyring as my ssh agent.  Which brings me back to the environment variable problem that led me to file this feature request.

Sigh... with progress comes growing pains.
Comment 5 Brian J. Tarricone (not reading bugmail) 2009-10-24 03:30:05 CEST
Well, xfce4-session will launch gnome-keyring for you if you enable gnome support...
Comment 6 Forest 2009-10-24 03:45:45 CEST
> Well, xfce4-session will launch gnome-keyring for you if you enable gnome
> support...

I have gnome support enabled, and gnome-keyring-daemon --login gets launched, but the second run with the --start option (described in the docs I linked above) does not.  Or maybe the second run does get launched but the environment variables it spits out do not get set in xfce.  Without those variables getting set, it's useless to an ssh client.  Which leads me back to this feature request.
Comment 7 Forest 2009-10-24 03:50:17 CEST
As long as we're discussing it, here's a related comment which also mentions the --start phase:
https://bugs.launchpad.net/ubuntu/+bug/377467/comments/8
Comment 8 Brian J. Tarricone (not reading bugmail) 2009-10-24 03:59:42 CEST
It looks like we only support an older version of gnome-keyring, cuz the variables are different.  You can open a bug report for that if you want, but, to be honest, I don't use it and thus don't really care about it, so it'll probably be up to someone else to write a patch to fix it.
Comment 9 Jérôme Guelfucci editbugs 2010-10-25 09:02:18 CEST
I guess that now that gnome-keyring is fixed in git master, there is no need for this stuff. Closing this as wontfix.

Bug #5900

Reported by:
Forest
Reported on: 2009-10-23
Last modified on: 2010-10-25

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Attachments

Additional information