1

I have Ubuntu Gnome 14.04, up-to-date; nautilus and nautilus-open-terminal are installed and updated:

 [romano:~] % wajig status nautilus nautilus-open-terminal
Package                 Installed       Previous        Now             State
=======================-===============-===============-===============-=====
nautilus                1:3.10.1-0ubuntu9.7 1:3.10.1-0ubuntu9.7 1:3.10.1-0ubuntu9.7 install
nautilus-open-terminal  0.20-1          0.20-1          0.20-1          install

I noticed that the ssh-derived commands in the terminals opened by the right-click "Open in terminal" from nautilus windows kept asking my passphrase; upon further investigations, it results that a normal shell, started with CTRL-ALT-T or with the dash, I have:

[romano:~] % env | grep -i ssh                           
SSH_AUTH_SOCK=/run/user/1153/keyring-S6rI11/ssh

while in the "open in terminal" shell I have no trace of that environment variable:

[romano:~/education … -SAP-135/Lab-8] % env | grep -i ssh
[romano:~/education … -SAP-135/Lab-8] 1 %

...and generally, environment variables are passed to this shell:

[romano:~/education … -SAP-135/Lab-8] 1 % env | wc -l      
70

Why is the SSH_AUTH_SOCK shell variable not passed down? Is it possible to avoid it?

0

There is a launchpad bug report for this issue: #1411174

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Pilot6 Jun 16 '15 at 17:22
  • @Pilot6 --- in general I agree with you, but in this case there is no much more to be said... "it's a bug". Will try to see if I can workaround it (not easy). – Rmano Jun 16 '15 at 19:45
1

OK, it's a bug. Probably the nautilus issue is launched before the shell that sets up the SSH* variables.

Workaround

(ugly).

  1. open a terminal
  2. kill the file manager: nautilus -q
  3. restart it again: nautilus & disown %%, in background and detached.
  4. close the terminal

Now the new nautilus session in the desktop is descendent from a shell with the SSH_AUTH_SOCK correctly set up, and the spawned terminal will have it all right.

Until nautilus crashes or die for whatever reason. In that case, repeat.

2
  • Thanks for this... it is so annoying bug and not solved for a year :( – jk_ Apr 10 '16 at 18:51
  • @jk_ Surprised? It's not a record-setting bug, mind you. Look at bugzilla.mozilla.org/show_bug.cgi?id=377621 --- unfortunately it happens. – Rmano Apr 10 '16 at 19:00
0

Not sure if this is a good solution, I added the following line into the ~/.profile:

export SSH_AUTH_SOCK=/run/user/1000/keyring/ssh

My key is unlocked on login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.