aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts/my-pinentry
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-05-16 17:24:58 +0200
committerneodarz <neodarz@neodarz.net>2019-05-16 17:24:58 +0200
commite6d3579a105b078d85d6f289c7735d29f29cabb8 (patch)
tree594a617cdaa2d3e9dfd382ff887e5eb7d2746659 /scripts/.scripts/my-pinentry
parent469e62e70891a37ec4016fcd025f979859074ef7 (diff)
downloaddotfiles_ascii-e6d3579a105b078d85d6f289c7735d29f29cabb8.tar.xz
dotfiles_ascii-e6d3579a105b078d85d6f289c7735d29f29cabb8.zip
Use new pinentry script to select if this need GUI or TUI
By default is TUI but if a programm need a GUI for acces gpg keys just add PINENTRY_USER_DATA="gtk" before start it.
Diffstat (limited to 'scripts/.scripts/my-pinentry')
-rwxr-xr-xscripts/.scripts/my-pinentry16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/.scripts/my-pinentry b/scripts/.scripts/my-pinentry
new file mode 100755
index 0000000..b46687e
--- /dev/null
+++ b/scripts/.scripts/my-pinentry
@@ -0,0 +1,16 @@
+#!/bin/bash
+# choose pinentry depending on PINENTRY_USER_DATA
+# requires pinentry-curses and pinentry-gtk2
+# this *only works* with gpg 2
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802020
+
+case $PINENTRY_USER_DATA in
+gtk)
+ exec /usr/bin/pinentry-gtk-2 "$@"
+ ;;
+none)
+ exit 1 # do not ask for passphrase
+ ;;
+*)
+ exec /usr/bin/pinentry-curses "$@"
+esac