From 2ec571aa18cf2c098c9cd55987d41ccd79ca529d Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Sun, 11 Jun 2023 14:29:13 +0800 Subject: [PATCH] Support GPG in KDE better. --- bash/.bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bash/.bashrc b/bash/.bashrc index 0aa3228..84ee2e4 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -8,5 +8,11 @@ alias ls='ls --color=auto' PS1='[\u@\h \W]\$ ' +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi + export GPG_TTY=$(tty) gpg-connect-agent updatestartuptty /bye >/dev/null + -- 2.39.5