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.
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.
> 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.
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.
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.
Well, xfce4-session will launch gnome-keyring for you if you enable gnome support...
> 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.
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
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.
I guess that now that gnome-keyring is fixed in git master, there is no need for this stuff. Closing this as wontfix.