On 2026-03-06 18:14:26 +0100, Andreas Metzler wrote:
> On 2026-03-06 Vincent Lefevre <[email protected]> wrote:
> > On my machine, it does *not* fall back to tty (contrary to
> > pinentry-fltk in this case):
>
> > qaa:~> unset DISPLAY
> > qaa:~> pinentry-qt
> > qt.qpa.xcb: could not connect to display
> > 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: xcb, wayland, linuxfb, offscreen, minimal,
> > vkkhrdisplay, vnc, wayland-egl, eglfs, minimalegl.
>
> > zsh: IOT instruction (core dumped) pinentry-qt
>
> That seems to be a zsh issue:
> https://www.zsh.org/mla/workers/2023/msg00330.html
> it mixes up clean exit with SIGABRT and crashing.
Just for the "zsh: IOT instruction (core dumped)" message, which is
really a minor issue.
SIGABRT is an abnormal termination (normally due to an unrecoverable
error following a bug, such as assertion failures, which is why a
core dump is generated for debugging), as opposed to a termination
with exit() (or equivalently, a return from main()).
I think I'm actually facing 2 bugs:
1. Some kind of initialization issue (because it occurs very early),
when DISPLAY is unset or set but unavailable. This one is specific to
pinentry-qt.
2. The lack of fallback when DISPLAY is set but unavailable. This one
affects both pinentry-fltk and pinentry-qt, and seems to occur only
when the program tries to display a dialog box.
In fltk/main.cxx, I can see:
#ifdef FALLBACK_CURSES
if (!pinentry_have_display(argc, argv))
pinentry_cmd_handler = curses_cmd_handler;
else
#endif
(qt/main.cpp has something very similar), and pinentry/pinentry.c
defines pinentry_have_display(), which just checks whether a --display
option is used or $DISPLAY is defined. In particular, it does not try
to connect to the display. This is the second bug (possibly seen as a
missing feature).
I suppose that the first bug occurs before the check for the fallback
to curses.
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)