diff --git a/pinentry-wrapper b/pinentry-wrapper index 6d019d7..99bd6b2 100644 --- a/pinentry-wrapper +++ b/pinentry-wrapper @@ -59,7 +59,10 @@ then elif [ -x /usr/bin/pinentry-qt ] then export PINENTRY_BINARY="/usr/bin/pinentry-qt" -# pinentry-curses is installed by default +# pinentry-curses is installed by default, test if we're in a terminal +elif [ -t 2 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-curses" else #test if gui binary is required for opt in "$@"; do @@ -69,8 +72,6 @@ else exit 1 fi done - export PINENTRY_BINARY="/usr/bin/pinentry-curses" - fi fi diff --git a/pinentry.spec b/pinentry.spec index c576072..7fbe2d3 100644 --- a/pinentry.spec +++ b/pinentry.spec @@ -17,7 +17,7 @@ Name: pinentry Version: 0.8.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Collection of simple PIN or passphrase entry dialogs Group: Applications/System @@ -189,6 +189,9 @@ fi %changelog +* Tue Jul 26 2011 Stanislav Ochotnicky - 0.8.1-4 +- Improve wrapper to fallback to curses even with DISPLAY set (#622077) + * Fri Feb 18 2011 Stanislav Ochotnicky - 0.8.1-3 - Fix pinentry-curses running as root by disabling capabilities (#677670)