On 2026-03-07 Vincent Lefevre <[email protected]> wrote:
> On 2026-03-07 19:17:54 +0100, Andreas Metzler wrote:
[...]
>> Because I have got XDG_SESSION_TYPE=tty since I am not using a graphical
>> display manager like gdm but startx+wmaker.

> OK, I suppose that pam_systemd is used at tty login time, but
> not when X is started. I think that either startx or xinit
> should change XDG_SESSION_TYPE to "x11", otherwise I don't
> see the point of differentiating "tty" and "x11".

Might be. I could not find verbose docs, contrary to the XDG... name it
is systemd-specific, I would not rule out that setting
XDG_SESSION_TYPE=x11 without an xsession-manager is wrong.

> > The whole thing is also not trivially fixable, neither QT nor FLTK have
> > a direct replacement for gtk_init_check().

> I normally use VLC with its Qt interface, and when I run

>   env DISPLAY=:1 vlc

> VLC falls back to the tty interface. This shows that there is
> a solution at least for Qt.

> In any case, if X11 is detected, XOpenDisplay() could be used.
> It seems that this is what VLC does: modules/gui/qt/qt.cpp has

> static bool HasX11( vlc_object_t *obj )
> {
>     if( !vlc_xlib_init( obj ) )
>         return false;

>     Display *dpy = XOpenDisplay( NULL );
>     if( dpy == NULL )
>         return false;

>     XCloseDisplay( dpy );
>     return true;
> }

I am sure it is solvable in some way, but adding Xlib (and wayland) calls
to a QT application is quite far from a "trivial" fix.

cu Andreas
-- 
"You people are noisy," Nia said.
I made the gesture of agreement.

Reply via email to