From c6eb8e5092b22e4bb611deb5a11273547f8b1f1e Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 17 Apr 2026 14:47:34 +0100 Subject: fix: set GPG_TTY per interactive shell, not just at login GPG_TTY was set in .zprofile (login shell) to /dev/tty1, but terminal emulator shells get /dev/pts/N. Move the export to .zshrc so each interactive shell sets the correct TTY before telling the agent. --- home/.config/zsh/.zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'home/.config/zsh/.zshrc') diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc index bd03e8b..fad4bca 100644 --- a/home/.config/zsh/.zshrc +++ b/home/.config/zsh/.zshrc @@ -283,7 +283,9 @@ compdef sys=systemctl ssys=systemctl sysu=systemctl compdef l=lsd la=lsd lt=lsd # ── GPG agent ───────────────────────────────────────────────────────────────── -# Refresh gpg-agent's TTY so pinentry prompts appear in the right terminal +# Set GPG_TTY to this shell's actual TTY (not the login console) and tell +# the agent so pinentry prompts appear in the right terminal +export GPG_TTY=$TTY gpg-connect-agent updatestartuptty /bye &>/dev/null # ── Zoxide (smart directory jumping) ────────────────────────────────────────── -- cgit v1.2.3-70-g09d2