summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.org2
-rw-r--r--tag-zsh/config/zsh/zshenv2
2 files changed, 2 insertions, 2 deletions
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
diff --git a/tag-zsh/config/zsh/zshenv b/tag-zsh/config/zsh/zshenv
index e75704c..f1cad02 100644
--- a/tag-zsh/config/zsh/zshenv
+++ b/tag-zsh/config/zsh/zshenv
@@ -14,7 +14,7 @@ then
 
   if [[ -z $SSH_AUTH_SOCK ]]
   then
-    export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
+    export SSH_AUTH_SOCK=${XDG_RUNTIME_DIR:-/run/user/$UID}/ssh-agent
   fi
 
   case $OSTYPE in