From e6d3579a105b078d85d6f289c7735d29f29cabb8 Mon Sep 17 00:00:00 2001 From: neodarz Date: Thu, 16 May 2019 17:24:58 +0200 Subject: 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. --- scripts/.scripts/launch_rofi-pass.sh | 1 + scripts/.scripts/my-pinentry | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 scripts/.scripts/launch_rofi-pass.sh create mode 100755 scripts/.scripts/my-pinentry (limited to 'scripts') diff --git a/scripts/.scripts/launch_rofi-pass.sh b/scripts/.scripts/launch_rofi-pass.sh new file mode 100755 index 0000000..87654ce --- /dev/null +++ b/scripts/.scripts/launch_rofi-pass.sh @@ -0,0 +1 @@ +PINENTRY_USER_DATA="gtk" exec rofi-pass 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 -- cgit v1.2.1