oneiric upgrade broke ssh-agent and gpg-agent

Adam Funk a24061 at ducksburg.com
Wed Nov 9 09:26:33 UTC 2011


On 2011-11-08, Adam Funk wrote:

> On 2011-11-08, Adam Funk wrote:
>
>> I just upgraded a machine to oneiric, and in Unity, Gnome, and Gnome
>> Classic, ssh-agent and gpg-agent are no longer working.  When I try
>> ssh-add, I get "Could not open a connection to your authentication
>> agent", and all use of gpg now gives "gpg: gpg-agent is not available
>> in this session".
>>
>> However, ps shows both /usr/bin/ssh-agent and and /usr/bin/gpg-agent
>> running, but env doesn't show any GPG- or SSH-related environment
>> variables.
>
> I've made a litle progress on this.  If I launch a GNOME terminal or
> xterm from the applications menu or a non-custom panel launcher ("add
> to panel" -> "application launcher" -> xterm selected from the menus),
> env shows the relevant variables and ssh-agent and gpg-agent work.
>
> But I normally use a custom keybinding in xbindkeys to launch xterms
> (much faster for me than using the mouse), and these terminals do not
> get the variables (so the two agents don't work).  Looking at the
> output of ps, I get the impression xbindkeys (process 8032 at present)
> has been started before ssh-agent (8034) and gpg-agent (8035), so that
> might explain why it hasn't inherited the variables?

I'm fairly certain now that the order of starting up the session is
the problem.  I'm now on a machine still running natty: xterms started
from xbindkeys have the variables and ssh-add works in them; the PIDs
are 29732 /usr/bin/ssh-agent, 29733 /usr/bin/gpg-agent, & 29806
xbindkeys.

I've also been discussing this under the launchpad bug "Gnome uses two
different ssh agents depending on how program is launched":

https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/839444





More information about the ubuntu-users mailing list