Created attachment 7071 call dbus-update-activation-environment after starting ssh-agent Allowing xfce4-session to manage starting ssh-agent for me resulted in gvfs requests not making use of the ssh-agent. Much of the issue is described in this Arch Linux bug report: https://bugs.archlinux.org/task/46398 The workaround listed in the bug report does work. Specifcally: dbus-update-activation-environment --systemd SSH_AUTH_SOCK pkill gvfs From this point on, gvfs request through Thunar successfully make use of the ssh-agent. However, I wanted to find a way to have everything working as expected immediately after login without need to apply a workaround. The attached patch appears to do so. Please consider including it.
A workaround: gdb -batch -ex "attach $(pidof gvfsd)" -ex "call putenv(\"SSH_AUTH_SOCK=$SSH_AUTH_SOCK\")" -ex "detach" this injects SSH_AUTH_SOCK into gvfsd's environment.
The above "workaround" will not work on many systems: https://linux-audit.com/protect-ptrace-processes-kernel-yama-ptrace_scope/ including mine: $ cat /proc/sys/kernel/yama/ptrace_scope 1 However, the provided patch does fix this problem without requiring the user to make other modifications. Please consider including it.
Eric Koegel referenced this bugreport in commit 2cf63e66c0285aaeee76155f463c85d04da6addc Export the SSH_AUTH_SOCK when spawning client (Bug #13486) https://git.xfce.org/xfce/xfce4-session/commit?id=2cf63e66c0285aaeee76155f463c85d04da6addc
Thanks for the patch!