Avoid pinentry-gtk-2 when using console!

Werner Koch wk at gnupg.org
Tue Jun 2 12:31:53 CEST 2009

On Sun, 31 May 2009 07:49, rogerx at sdf.lonestar.org said:

> if {environmental variable is set to console/gtk/qt3}
>   use the specified pinentry flavor

You can easily implement this with a little pinentry wrapper script and
using the PINENTRY_USER_DATA envvar which is passed all the way from gpg
to Pinentry.

> I'm guessing, the current solution is to assume the user is a dumb X
> user. ;-)

Definitely not.  Pinentry pops up and grabs the keyboard for a good
reasons: This makes it much harder to preset a faked Pinentry prompt and
sniff the Passphrase entered by the user.  The curses version can't do
that and thus the default is to use an X window if XDISPLAY is set.  If
you fear faked popup windows you may modify pinentry to show a custom

I am using gpg-agent for many years now and do almost all my work in
xterms and Emacs.  It does not bother me if Pinentry popups due to
background jobs every hour or so.



Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.

More information about the Gnupg-users mailing list