Bug 713955 - SSH_AUTH_SOCK environment variable not present in terminals launched via keyboard shortcut
Summary: SSH_AUTH_SOCK environment variable not present in terminals launched via keyb...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-settings-daemon
Version: 17
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-16 21:28 UTC by Derrich Hafemann
Modified: 2013-08-01 16:24 UTC (History)
22 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-01 16:24:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Derrich Hafemann 2011-06-16 21:28:42 UTC
Description of problem:

When launching a new terminal through a keyboard shortcut, the SSH_AUTH_SOCK environment variable is not populated. When launching the same terminal application through gnome-shell, the variable is populated.

Version-Release number of selected component (if applicable): gnome-shell-3.0.1-4.fc15.x86_64


How reproducible: Every time.


Steps to Reproduce:
1. Assign a keyboard shortcut to a terminal application. I'm using xterm (with a few options for fonts + colors, excluding these options doesn't change the behavior of the bug) with Ctrl+Shift+A
2. Launch xterm through that keyboard shortcut.
3. Run 'printenv | grep SSH'.
  
Actual results:

'printenv | grep SSH' returns :
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass

Expected results:

The SSH_AUTH_SOCK variable should be inherited. When launching xterm through gnome-shell, 'printenv | grep SSH' returns:

SSH_AUTH_SOCK=/tmp/keyring-ypRbNI/ssh
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass

Additional info:

This behavior isn't specific to one terminal emulator. The bug exists whether I'm using xterm, gnome-terminal or terminator. This behavior exists whether running GNOME3 in its normal mode, or in fall-back mode. Running Fedora 15 x86_64, from an upgraded Fedora 14 x86_64 installation.

Comment 1 Simon Lindgren 2011-12-27 11:29:40 UTC
I can reproduce this on a fresh Fedora 16 install (didn't test fallback mode though). Is there any progress on this? Any workaround?

Comment 3 Matthias Clasen 2012-01-11 00:51:30 UTC
This is a gnome-settings-daemon problem

Comment 4 Michal Ambroz 2012-03-27 13:22:00 UTC
Issue persist on Fedora 17. 
Terminal window which is open through Activities gets SSH_AUTH_SOCK and GPG_AGENT_INFO correctly exported with information from keyring.

When the application is opened through keyboard shortcut (Personal Menu/Keyboard/Shortcuts/Custom Shortcuts/Terminal) the only keyring setting is 

GNOME_KEYRING_CONTROL=/home/user/.cache/keyring-YYXqFb

but what is missing is 
GPG_AGENT_INFO=/home/user/.cache/keyring-YYXqFb/gpg:0:1
SSH_AUTH_SOCK=/home/user/.cache/keyring-YYXqFb/ssh


I am using this workaround in ~/.bashrc:
#GPG and SSH agent not exported when running terminal by shortcut
if [ -z "$GPG_AGENT_INFO" -a -z "$SSH_AUTH_SOCK" -a -n "$GNOME_KEYRING_CONTROL" ] ; then
        #derive GPG and SSH agent info from GNOME_KEYRING_CONTROL
        export GPG_AGENT_INFO="$GNOME_KEYRING_CONTROL/gpg:0:1"
        export SSH_AUTH_SOCK="$GNOME_KEYRING_CONTROL/ssh"
fi


Workaround for Fedora 15 and 16 it was working to set the keyboard shortcut for running terminal using the old metacity settings.
#Run Terminal on Win+t
gconftool-2 -s /apps/metacity/global_keybindings/run_command_terminal --type string '<Mod4>t'

Best regards
Michal Ambroz

Comment 5 Mads Villadsen 2012-04-04 11:32:00 UTC
Appears to have been fixed very recently in Ubuntu:

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

I assume the fix will be in the next gnome release as well, and will therefore show up in Fedora as well.

Comment 6 Sandi Wallendahl 2012-04-17 14:22:42 UTC
I'm using Fedora 16 x86_64 edition with LXDE desktop. Today I updated my system and run this very same problem although in my case GPG_AUTH_INFO and SSH_AUTH_SOCK won't get populated regardless how I start the gnome-terminal (or any terminal). 

I came up with a similar workaround like Michal here.

Comment 7 J. Bruce Fields 2012-05-07 15:14:37 UTC
Upstream bug appears to be https://bugzilla.gnome.org/show_bug.cgi?id=662528, fixed with upstream commit a9388f70abc975da31c908 "media-keys: Get the environment from gnome-keyring", not yet in any tagged release as far as I can tell.

Comment 8 Pierre-YvesChibon 2012-05-16 08:44:33 UTC
According to the report on the gnome bugzilla, this is supposed to be fixed in gnome-session 3.4 but running gnome-session 3.4.2, I still have the problem:
"""
$ echo $SSH_AUTH_SOCK

"""

Comment 9 David Mansfield 2012-05-30 18:29:51 UTC
i can confirm this bug for f17 "gold".  all updates applied.  

note: if a gnome-terminal is already running (through "activities") a keyboard shortcut will launch a new window off of that one.  but if not, it starts a new one without agent access.

Comment 10 Fedora End Of Life 2013-07-04 05:22:15 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2013-08-01 16:24:20 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.