]> git.rmz.io Git - dotfiles.git/commitdiff
gpg: use curses pinentry when no DISPLAY is set
authorSamir Benmendil <me@rmz.io>
Wed, 10 Apr 2024 16:58:17 +0000 (17:58 +0100)
committerSamir Benmendil <me@rmz.io>
Tue, 14 May 2024 21:53:36 +0000 (22:53 +0100)
This allows to use qt pinentry over ssh when X forwarding is enabled.

zsh/lib/gpg.zsh

index a9f81a2ebd255db545a0b987adb5caed23a6076a..b1274163c445918d41a2d3e5a623d1e0104e9074 100644 (file)
@@ -4,6 +4,6 @@ fi
 
 # Inform gpg-agent of the current TTY for user prompts.
 export GPG_TTY="$(tty)"
-if [[ -n "$SSH_CONNECTION" ]]; then
+if [[ -z "$DISPLAY" ]]; then
     export PINENTRY_USER_DATA="curses"
 fi