x2go: workaround for ssh agent bug
Stefan Bund [Wed, 11 Oct 2017 16:09:41 +0000 (18:09 +0200)]
setup/x2go-hack.el [new file with mode: 0644]

diff --git a/setup/x2go-hack.el b/setup/x2go-hack.el
new file mode 100644 (file)
index 0000000..56ca33a
--- /dev/null
@@ -0,0 +1,8 @@
+(defvar ssh-agent-auth-sock-link "~/.ssh/ssh_auth_sock")
+
+(defun g0dil-x2go-fix-ssh-agent ()
+  (let ((agent (getenv "SSH_AUTH_SOCK")))
+    (if (string-match "^.*/\.x2go/.*/ssh-agent.PID" agent)
+        (setenv "SSH_AUTH_SOCK" (expand-file-name ssh-agent-auth-sock-link)))))
+
+(g0dil-x2go-fix-ssh-agent)