Page MenuHome GnuPG

Qt5 application doesn't support -display any more
Open, LowPublic

Description

To reproduce the problem:

$ echo $DISPLAY
:0.0
$ (unset DISPLAY; pinentry-qt --display :0.0)
Unable to init server: Could not connect: Connection refused

(pinentry-qt:8246): Gtk-WARNING **: 12:00:11.688: cannot open display:

Because gpg-agent may invoke pinentry with no DISPLAY env var but --display option, this is problematic.

Details

Version
1.1.0

Event Timeline

aheinecke added projects: Stalled, pinentry, qt.
aheinecke added a subscriber: aheinecke.

The problem only occurs with the gtk platformtheme.

If I run:

(unset DISPLAY; QT_QPA_PLATFORMTHEME=gtk3 pinentry-qt --display :0.0)

I can reproduce the problem. Without it my qt uses the KDEPlasmaPlatformTheme and passing display works. You can find available themes under /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes

The upstream bug for this is: https://bugreports.qt.io/browse/QTBUG-66043