From 875cbef0b9a112541c77ea79ddfb39c9a24d9293 Mon Sep 17 00:00:00 2001 From: c47 Date: Sat, 17 Feb 2024 09:36:41 +0100 Subject: [PATCH] Move ssh-agent.sock to /var/run/user Totally forgot about /var/run/user directory. There is already a place for user specific tempfiles, so better use that one instead. --- bash/bashrc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bash/bashrc b/bash/bashrc index 815ba95..c263278 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -135,11 +135,7 @@ fi export PATH=${HOME}/.local/bin:${HOME}/.nix-profile/bin:${PATH} -if [[ ! -d /tmp/ssh-1000 ]]; then - mkdir -m 0700 /tmp/ssh-1000 -fi - -export SSH_AUTH_SOCK=/tmp/ssh-1000/ssh-agent.sock +export SSH_AUTH_SOCK=/var/run/user/$(echo $UID)/ssh-agent.sock if [[ ! $(pidof ssh-agent) ]]; then eval $(ssh-agent -a ${SSH_AUTH_SOCK})