Hello,
pinentry-gtk-2 falls back to displaying messages on the TTY if DISPLAY is set but inaccessible, i.e. when invoked like this:
```
env DISPLAY=invalid pinentry
```
-qt immediately exits with error in this scenario
```
ametzler@argenau:~$ env DISPLAY=invalid pinentry-qt
qt.qpa.xcb: could not connect to display invalid
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, wayland, offscreen, linuxfb, wayland-egl, vnc, minimalegl, minimal, xcb, vkkhrdisplay.
Aborted env DISPLAY=invalid pinentry-qt
```
and -fltk exits with an error once it tries to access the display:
```
ametzler@argenau:~$ env DISPLAY=invalid pinentry-fltk
OK Pleased to meet you, process 7016
message
Can't open display: invalid
ametzler@argenau:~$ echo $?
1
```
Additionally the original submitter of the Debian bug report https://bugs.debian.org/1129944 also got the abort (instead of fallback) for unset DISPLAY.