FS#46398 - [dbus] gvfs does not use ssh-agent anymore (since 1.10.0-3)

Attached to Project: Arch Linux
Opened by freswa (frederik) - Tuesday, 22 September 2015, 13:06 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 20 September 2023, 02:07 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
On 1.10.0-2 gvfsd used ssh-agent to get ssh-keys for sftp connection. Since 1.10.0-3 I need to restart gvfsd in terminal to get it working.
Gvfsd normally is started via dbus service file. So I think this is related to the latest update of dbus and the environment variables that ssh-agent sets at startup.

dbus 1.10.0-3
libdbus 1.10.0-3

Steps to reproduce:
1. startup system
2. load some ssh-keys into ssh-agent
3. try to access a sftp server via gvfs (e.g. via thunar)
This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 20 September 2023, 02:07 GMT
Reason for closing:  Upstream
Additional comments about closing:  Definitely not an Arch packaging issue. It needs to be fixed upstream...but it's unclear exactly *where* upstream.
Comment by Doug Newgard (Scimmia) - Tuesday, 22 September 2015, 13:49 GMT
Duplicate of  FS#46369 ?
Comment by freswa (frederik) - Tuesday, 22 September 2015, 13:53 GMT
Nope, DBUS_SESSION_BUS_ADDRESS is properly set.
Comment by Jan Alexander Steffens (heftig) - Tuesday, 22 September 2015, 18:31 GMT
Please try running `dbus-update-activation-environment --systemd SSH_AUTH_SOCK` before you use startx.
Comment by freswa (frederik) - Tuesday, 22 September 2015, 19:57 GMT
Do you have a suggestion where to put the command if using lightdm and xfce?
Comment by freswa (frederik) - Tuesday, 22 September 2015, 20:25 GMT
I tried the command "dbus-update-activation-environment --systemd SSH_AUTH_SOCK" within a running session.

Before:
- run command
- kill gvfsd
- start thunar (which starts gvfsd again)
-> does not work

Now:
- run command
- kill gvfsd
- start thunar (which starts gvfsd again)
-> works

The problem seems to be the initialization of ssh-agent.
I need to start ssh-agent in my ~/.xprofile while gvfsd is started by dbus via /usr/share/dbus-1/services/gvfs-daemon.service...
Comment by Jan Alexander Steffens (heftig) - Tuesday, 22 September 2015, 20:35 GMT
Run that command in .xprofile after ssh-agent.
Comment by freswa (frederik) - Tuesday, 22 September 2015, 20:37 GMT
I have just added the command at the bottom of .xprofile -> gvfs works
Comment by freswa (frederik) - Thursday, 24 September 2015, 08:01 GMT
Is this behaviour a bug or a feature?
Comment by Friedrich Strohmaier (bitsfritz) - Sunday, 15 November 2015, 02:14 GMT
not having a .xprofile at all

~$ echo "dbus-update-activation-environment --systemd SSH_AUTH_SOCK" > ~/.xprofile

does activate the workaround here
Comment by Patrick (killswitch) - Thursday, 17 December 2015, 17:14 GMT
This still does not work for me even with the workaround added above to ~/.xprofile and reboots.

Running XFCE latest, no ssh-agent working for Thunar or Caja. 'ssh-add -L' clearly shows right key loaded, same key works on a different OS (Debian). ssh-agent is started by XFCE.

Possibly had this bug in Fedora as well months ago but can't install it to check.

(Could be a variant of this bug, but same result)
Comment by Friedrich Strohmaier (bitsfritz) - Saturday, 13 February 2016, 23:58 GMT
Make sure your keys are added

Try:
~$ dbus-update-activation-environment --systemd SSH_AUTH_SOCK
- close thunar
~$ pkill gvfs
- start thunar

Does this help?
Comment by Jamin Collins (jamincollins) - Sunday, 09 April 2017, 01:54 GMT
I've managed to fix this in xfce4-session with the attached patch.

I've also filed a report upstream (also with the patch):
https://bugzilla.xfce.org/show_bug.cgi?id=13486
Comment by Jamin Collins (jamincollins) - Monday, 17 July 2017, 14:35 GMT
It's been a while, any update?
Comment by Jamin Collins (jamincollins) - Thursday, 10 August 2017, 17:48 GMT Comment by Friedrich Strohmaier (bitsfritz) - Sunday, 12 March 2023, 03:32 GMT Comment by Toolybird (Toolybird) - Sunday, 12 March 2023, 03:34 GMT
I see the same thing as reported in the new upstream ticket i.e. gvfs-daemon.service starts too early. If I restart that --user service then it all works fine.

Edit: Alternatively, I suppose xfce could be starting the ssh-agent too late.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...