Issue with pinentry GUI agent

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Sep 5 16:20:59 CEST 2018


On Wed 2018-09-05 09:39:31 +0200, Kristian Fiskerstrand wrote:
> On 9/4/18 6:10 PM, Daniel Kahn Gillmor wrote:
>> or do you mean something else?
>
> without DISPLAY env var, qt version automatically falls back to curses
> variant despite the argument
>
> kristianf at ares ~ $ unset DISPLAY
> kristianf at ares ~ $ /usr/bin/pinentry-qt4 --display :0
>
> (pinentry-qt4:6370): Gtk-WARNING **: 09:31:41.576: cannot open display:
> kristianf at ares ~ $ export DISPLAY=:0
> kristianf at ares ~ $ /usr/bin/pinentry-qt4 --display :0
> OK Pleased to meet you
>
> throwing in a simple wrapper around pinentry,
> #!/bin/bash
> env > /tmp/pinentry-log.txt
> echo "$@" >> /tmp/pinentry-log.txt
> exec /usr/bin/pinentry-qt "$@"
>
> and diffing the log between keep-display, shows that the difference is
> +DISPLAY=:0
>
> btw, you say started, but this should also be updated when issuing
> UPDATESTARTUPTTY shouldn't it? In any case, it solved the issue for the
> user and I replicated it also on pinentry 1.1.0 on gnupg 2.2.10

I'm unable to replicate this.  here's a transcript of my session,
testing pinentry-qt 1.1.0-1+b1 and gnupg 2.2.10-1 on debian
testing/unstable:


0 dkg at alice:~$ DISPLAY= pinentry-qt 
OK Pleased to meet you
getpin
D monkey
OK
0 dkg at alice:~$ DISPLAY= pinentry-qt --display :0
OK Pleased to meet you
getpin
D monkey
OK
0 dkg at alice:~$ unset DISPLAY
0 dkg at alice:~$ pinentry-qt --display :0
OK Pleased to meet you
getpin 
D abc123
OK
0 dkg at alice:~$ pinentry-qt 
OK Pleased to meet you
getpin
D abc123
OK
0 dkg at alice:~$ 

The two entries with --display caused a graphical display to pop up.
the other two caused the curses fallback.

if you can sort out a clearer replication, please report it on
https://dev.gnupg.org/maniphest/task/edit/form/3/ !

Regards,

    --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180905/a6716f32/attachment.sig>


More information about the Gnupg-users mailing list