From 49a5ac56ccf6bea186dcf0bfccb32bb82b05a772 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 28 Feb 2017 14:58:09 +0100 Subject: Fix setting SSH_AUTH_SOCK --- tag-emacs/emacs.d/init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 916bb61..d019e16 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -677,7 +677,7 @@ that I can sudo on remote machines :defer 7 :config (progn (unless (getenv "SSH_AUTH_SOCK") - (setenv "SSH_AUTH_SOCK" "/run/user/1000/ssh-agent.socket")) + (setenv "SSH_AUTH_SOCK" (format "/run/user/%s/ssh-agent" (user-uid)))) (setq tramp-default-method "ssh" tramp-default-user-alist '(("\\`su\\(do\\)?\\'" nil "root")) tramp-backup-directory-alist backup-directory-alist -- cgit 1.4.1