From 6f7f89025b3983d3f7876d5c15b51e6ac2851e17 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 24 Nov 2025 15:35:11 +0100 Subject: Update pinentry wrapper to allow GUI when requested but default to tty Fixes unix inconsistency while using ~ in pinentry-program, it works on the mac but doesn't in linux --- .gnupg/gpg-agent.conf | 2 +- .gnupg/pinentry-wrapper | 4 ++-- README.md | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf index a6158b7..6d38770 100644 --- a/.gnupg/gpg-agent.conf +++ b/.gnupg/gpg-agent.conf @@ -1,4 +1,4 @@ -pinentry-program ~/.gnupg/pinentry-wrapper +pinentry-program /usr/local/bin/pinentry-wrapper default-cache-ttl 3600 default-cache-ttl-ssh 3600 diff --git a/.gnupg/pinentry-wrapper b/.gnupg/pinentry-wrapper index 9964241..f902298 100755 --- a/.gnupg/pinentry-wrapper +++ b/.gnupg/pinentry-wrapper @@ -7,8 +7,8 @@ # Fixes the pinentry-tty error https://github.com/neomutt/neomutt/issues/1014 case $PINENTRY_USER_DATA in - curses) - exec pinentry-curses "$@" + gnome) + exec pinentry-gnome3 "$@" ;; *) exec pinentry-tty "$@" diff --git a/README.md b/README.md index 6d5c90c..150e860 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ git clone https://git.sr.ht/~a14m/.rc cd ~/.rc stow --no-folding . chmod 0700 ~/.gnupg +cp ~/.rc/.gnupg/pinentry-wrapper /usr/local/bin/pinentry-wrapper gpgconf --kill gpg-agent gpg-connect-agent /bye git remote set-url origin git@git.sr.ht:~a14m/.rc -- cgit v1.2.3