Re: gnome-keyring gvfsd-sftp without -daemon on OpenBSD



On Tue, Dec 15, 2009 at 06:52:01PM -0600, Stef Walter wrote:
> Alexander Larsson wrote:
> > So, if you never want to use the g-k-r ssh agent, why does the
> > GetEnvironment call return a ssh agent? Wouldn't it be a better idea to
> > disable the ssh-agent part of gnome-keyring?
> 
> First of all there needs to be a better way of disabling the
> gnome-keyring SSH agent.  In fact I have some ideas in this area that
> could might be implementable by 2.30. We would use the standard "Startup
> Applications" gnome-session-properties stuff.
> 
> gnome-keyring-daemon already has a two phase startup complicated by the
> fact that part of it is started by PAM. The second phase calls into a
> running daemon and initializes it. [1] This is currently undergoing some
> changes, but the principle will remain the same.

It is started by PAM.. where PAM is present, which is not the case on
OpenBSD, for the record. And it is launched by gnome session, which
means users of xfce don't have it running (well actually xfce4-session
has some code to link with gkr and start it optionally, but that's not
enabled nor compiled in by default). And xfce users will more and more
need gvfs working, as next thunar (the file manager) is gio-based.

In my xfce session, gkr seems to be launched the first time i run gvfs-mount,
which makes the dbus GetEnvironment call. If i disable the GetEnv call, no gkr
is spawned.

Which brings us back to point 0 : gvfs-sftp 'virtually' depends on gkr, which
adds it as a dependency even if not running gnome (or xfce), where one
could prefer to use plain openssh agent.

> I think we could use a similar principle and install an autostart
> desktop file which calls into the running daemon and turns on the SSH
> agent. This could then be disabled by the user in "Startup Applications".

Yeah, way to go, really. xdg startup spec seems to be the common target
for everyone.. but i don't know if it should be two autostart desktop,
one for gkr and one for its ssh agent, or one for gkr and keep the gconf
dance to disable the ssh agent.

> But IMO that's an aside to the real issue:
> 
> I think the reason gvfs-sftp hard codes a call to GetEnvironment is
> because gvfsd's autostart often gets started before
> gnome-keyring-daemon's autostart. Therefore it won't have the real
> SSH_AUTH_SOCK environment variable needed for openssh to use the agent.
> 
> Although gnome-keyring-daemon registers its environment variables with
> org.gnome.SessionManager the gvfsd horse has already left the barn.

yeah, i got that part, which leaded to the fix implementing
GetEnvironment. It makes sense, if you run bare gnome session i suppose
it works flawlessly.. but if you have another ssh agent it is overriden
:)

Thanks for the details on gkr, i now better see how it is supposed to
work. Now i'm back to my issue of getting EBADF when calling gvfs-mount, and
not manually running gvfsd-sftp..

Landry


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]