Gnome uses two different ssh agents depending on how program is launched

Bug #839444 reported by Kasper Dupont on 2011-09-02
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
gnome-session
Fix Released
Medium
gnome-session (Debian)
New
Undecided
Unassigned
gnome-settings-daemon (Ubuntu)
Low
Unassigned

Bug Description

If a shell is launched through the menu SSH_AUTH_SOCK will have a value of the form /tmp/keyring-xxxxxx/ssh. If a keyboard shortcut is created through System > Preferences > Keyboard Shortcuts and that shortcut is used to launch a shell, then SSH_AUTH_SOCK will have a value of the form /tmp/ssh-xxxxx#####/agent.#####.

All shells in the session should by default be using the same ssh-agent.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-session-bin 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-33.72-generic 2.6.32.41+drm33.18
Uname: Linux 2.6.32-33-generic i686
Architecture: i386
Date: Fri Sep 2 12:06:28 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04.3 LTS "Lucid Lynx" - Release i386 (20110720.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_DK.utf8
 SHELL=/bin/bash
SourcePackage: gnome-session

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-session (Ubuntu):
status: New → Confirmed
Matthieu codron (circlecode) wrote :

I am experiencing a variant of this, but it seems to be the same bug:
I installed terminator. when launching terminator from gnome-shell, SSH_AUTH_SOCK has a value of the form /tmp/keyring-xxxxxx/ssh (this is normal since I commented "use-ssh-agent" in /etc/X11/Xsession.options.

But when launching terminator via a custom shortcut, SSH_AUTH_SOCK is not defined

(By the way, I am using Natty)

Matthieu codron (circlecode) wrote :

It seems this bug is known in red hat: https://bugzilla.redhat.com/show_bug.cgi?id=713955

Adam Funk (a-funk) wrote :

I'm having a similar problem, which was very confusing until I came across this bug report. If I launch xterm from the applications menu or from a panel launcher created using "add to panel" -> "application launcher" -> xterm, ssh-agent and gpg-agent are available.

But I normally use a custom keybinding from xbindkeys to launch xterms (faster for me than using the mouse), and they don't get the environment variables necessary for ssh-agent and gpg-agent to work.

Adam Funk (a-funk) wrote :

I only have this problem on a machine upgraded to oneiric (the one still on natty works fine), and I think my problem is that the new version of GNOME session starts xbindkeys up before ssh-agent and gpg-agent, so xbindkeys and processes it starts do not inherit the environment variables. I get the same problem in Unity, Gnome, and Gnome Classic.

I found that on the oneiric machine, xbindkeys seems to be starting before ssh-agent and gpg-agent (according to the PID sequence), but on the natty machine, xbindkeys starts afterwards. Is there a way to fix the session order in oneiric GNOME?

Tyler Harmor (tharmor) wrote :

Does anyone have a temporary work around for this?

markgalassi (mark-galassi) wrote :

this is a real show-stopper for gnome3; is there truly no workaround yet?

affects: gnome-keyring → gnome-session
Changed in gnome-session (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Changed in gnome-session:
importance: Unknown → Medium
status: Unknown → New
Changed in gnome-session:
status: New → Confirmed
Jamin W. Collins (jcollins) wrote :

For xbindkeys users, this bug is reported against Debian here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628654

The work around is to simply create a ~/.xbindkeys.noauto file (note the leading period on the file name). This will prevent the Xsession startup script from launching xbindkeys too early. Then start xbindkeys via your normal mechanism.

affects: gnome-session (Ubuntu) → gnome-settings-daemon (Ubuntu)
Changed in gnome-settings-daemon (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 3.4.0-0ubuntu3

---------------
gnome-settings-daemon (3.4.0-0ubuntu3) precise; urgency=low

  * debian/patches/correct_logout_action.patch:
    - display the logout action on ctrl-alt-del (lp: #961501)
  * debian/patches/60_unity_hide_status_icon.patch:
    - don't show the power status icon under classic either (lp: #965279)
  * debian/patches/git_keyring_environment.patch:
    - "Get the environment from gnome-keyring When launching
       custom applications." (lp: #839444)
 -- Sebastien Bacher <email address hidden> Tue, 03 Apr 2012 17:28:40 +0200

Changed in gnome-settings-daemon (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-session:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.