From peter_e at gmx.net Wed Jan 4 22:49:03 2006 From: peter_e at gmx.net (Peter Eisentraut) Date: Wed Jan 4 22:48:52 2006 Subject: Bug#345826: pinentry-gtk2: pinentry waits for input it can never read In-Reply-To: <20060103192044.5847.29831.reportbug@localhost> References: <20060103192044.5847.29831.reportbug@localhost> Message-ID: <200601042249.04040.peter_e@gmx.net> 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 () { > 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). From albrecht.dress at arcor.de Fri Jan 6 12:16:50 2006 From: albrecht.dress at arcor.de (=?iso-8859-1?q?Albrecht_Dre=DF?=) Date: Fri Jan 6 13:04:18 2006 Subject: Bug#345826: pinentry-gtk2: pinentry waits for input it can never read In-Reply-To: <200601042249.04040.peter_e@gmx.net> (from peter_e@gmx.net on Wed Jan 4 22:49:03 2006) References: <20060103192044.5847.29831.reportbug@localhost> <200601042249.04040.peter_e@gmx.net> Message-ID: <1136546218l.7728l.0l@antares.localdomain> 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: . My solution is to add the statement export GPG_TTY=$(tty) 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 _________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : /pipermail/attachments/20060106/4b537b49/attachment.pgp From wk at gnupg.org Fri Jan 6 14:40:40 2006 From: wk at gnupg.org (Werner Koch) Date: Fri Jan 6 14:47:24 2006 Subject: Bug#345826: pinentry-gtk2: pinentry waits for input it can never read In-Reply-To: <1136546218l.7728l.0l@antares.localdomain> (Albrecht =?utf-8?Q?Dre=C3=9F's?= message of "Fri, 06 Jan 2006 12:16:50 +0100") References: <20060103192044.5847.29831.reportbug@localhost> <200601042249.04040.peter_e@gmx.net> <1136546218l.7728l.0l@antares.localdomain> Message-ID: <87oe2pcw4n.fsf@wheatstone.g10code.de> On Fri, 06 Jan 2006 12:16:50 +0100, Albrecht Dre? said: > > export GPG_TTY=$(tty) > Sure, the manual explictly says this. GTK+ does not work without knowing a tty. Salam-Shalom, Werner