Mailing List Archive

Re: Bug#345826: pinentry-gtk2: pinentry waits for input it can never read
This has been reported to the Debian bug tracking system. Comments?

> Package: pinentry-gtk2
> Version: 0.7.2-3
> Severity: normal
>
> When using pinentry from the console program without setting the ttyname
> OPTION pinentry waits forever for input it can never read because there
> is no input available. I think this should not happen and pinentry should
> abort with an error if it can not get the TTY for the input itself like
> it does when it is directly started from the console.
>
> The following perl program demonstrates the problem:
> ---->8----
> #! /usr/bin/perl
>
> use FileHandle;
> use IPC::Open2;
>
> open2(*PINOUT, *PININ, "pinentry");
> print PININ "GETPIN\n";
> while (<PINOUT>) {
> print $_
> }
> ---->8----
>
> This works fine when it is run from an X terminal. In my opinion it
> should not be the responsibility of the program using pinentry to find
> out if pinentry can use X or must fallback to the console.
>
> pinentry also only seems to check for the DISPLAY environment variable
> of find out which input method it should use. It would be better if it
> would fall back to console input if connecting to the X server fails for
> some reason and a ttyname is set. That would make using pinentry much
> easier as the using program can set ttyname whenever it is available and
> pinentry will use the first input method that works (X if DISPLAY is set,
> Console if ttyname is set, abort if both fails).

_______________________________________________
Gpa-dev mailing list
Gpa-dev@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gpa-dev
Re: Bug#345826: pinentry-gtk2: pinentry waits for input it can never read [ In reply to ]
Am 04.01.06 22:49 schrieb(en) Peter Eisentraut:
> This has been reported to the Debian bug tracking system. Comments?

Maybe this is related: <http://lists.gnupg.org/pipermail/gnupg-devel/2004-
October/021437.html>. My solution is to add the statement

<snip>
export GPG_TTY=$(tty)
</snip>

to my ~/.bashrc file.

Cheers, Albrecht.

>
> > Package: pinentry-gtk2
> > Version: 0.7.2-3
> > Severity: normal
> >
> > When using pinentry from the console program without setting the
> ttyname
> > OPTION pinentry waits forever for input it can never read because there
> > is no input available. I think this should not happen and pinentry
> should
> > abort with an error if it can not get the TTY for the input itself like
> > it does when it is directly started from the console.
[snipped more comments about this bug]

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)
Phone (+49) 228 6199571 - mailto:albrecht.dress@arcor.de
GnuPG public key: http://www.mynetcologne.de/~nc-dreszal/pubkey.asc
_________________________________________________________________________
Re: Bug#345826: pinentry-gtk2: pinentry waits for input it can never read [ In reply to ]
On Fri, 06 Jan 2006 12:16:50 +0100, Albrecht Dreß said:

> <snip>
> export GPG_TTY=$(tty)
> </snip>

Sure, the manual explictly says this. GTK+ does not work without
knowing a tty.


Salam-Shalom,

Werner


_______________________________________________
Gpa-dev mailing list
Gpa-dev@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gpa-dev