problems with pinentry, gpg-agent and multiple terminals (was: Re: Agent implementation)

Gregor Zattler texmex@uni.de
Mon Sep 23 14:34:02 2002


Hi Werner et al.,
* Werner Koch <wk@gnupg.org> [23. Sep. 2002]:
> On Sun, 22 Sep 2002 19:20:30 +0200, Florian Weimer said:
> > In addition, gpg-agent does not do what I want: I start gpg-agent on
> > one terminal, and invoke gpg on some other (or even in a pipe, without
> > a terminal).  gpg-agemt does not query for the passphrase on the first
> > terminal, but tries to use the terminal on which GnuPG is invoked,
> 
> This is intended.  I think it would be confusing when the pinentry
> pops up on another terminal and you have to switch to this terminal to
> enter the passphrase - if you at all recognize that there is another
> terminal waiting for an answer.

But that's what it behaves now:  

   I started gpg-agent via my .bash_profile as described in the
   documentation. Then i tried to sign a file.  First time nothing
   happend butt an error message stating it could not find pinentry.
   I made a link from pinentry to pinentry-gtk and tried again.  
   
   A "window" appeared at my console and i typed the passphrase.
   When i signed another file with the same key i gpg did it without
   asking me again.  *good*
   
   Then i startet X11 and a xterm and tried to sign a file with
   the same key. gpg did it without asking me.  *good*
   
!! Then in the same xterm i signed a file with a different key.
!! A few lines of text appeared:
!! "You need a passphrase to unlock the secret key for..." on this
!! xterm.  Cursor is on the left.  It looks like a terminal prompt.
!! So i type my other passphrase --> it appears in clear text on the
!! terminal: everybody can read it.  *very bad*
   
   I went back to the console: there is an "window" asking me for
   the the second keys passphrase.  Normally i would take notwendig
   notice of this.
   
?? Then i played a bit with this console window.  At some point i
?? hit "TAB" and then i was asked: "Display all 1125 possibilities?
?? (y or n)". *?*

[newest versions og gpg, pinentry and newpg as of yesterday]


I would like to have a simple terminal interface for passphrases,
so i can use it in scripts.


Ciao, Gregor