On 2026-03-22 15:20:30 -0400, Jeremy Bicha wrote: > On Sun, Mar 22, 2026 at 2:40 PM Vincent Lefevre <[email protected]> wrote: > > So, for a non-root user, there would be no way to override settings > > via this mechanism. > > Check the SYNOPSIS section again.
The SYNOPSIS section does not give precedence and override rules. The "CONFIGURATION DIRECTORIES AND PRECEDENCE" section does. > > But environment.d could be used for Wayland and /etc/X11/Xsession.d > > for X11. So this would work everywhere. > > environment.d is very simple and its simplicity is a big reason I like > the approach I used so far. It only provides an environment variable > so there is no mechanism for it to only work for Wayland sessions. It is not clear which software needs to use it. > Debian's gtk3-nocsd packaging provided complex scripts in > /etc/X11/Xsession.d/ . If you add a script, your script needs to make > sure that libgtk-nocsd.so.0 isn't already in LD_PRELOAD before adding > it. This is already the case with environment.d: The user's .xsession file may need the usual environment. If it does the work and the window manager does it too, this could yield the same issues. Ditto if a window manager is replaced by a different one (as this is possible under X), because the new window manager would read the environment again. If the environment is read by some script in /etc/X11/Xsession.d rather than each window manager, this would avoid the above issues. There is also the case of ssh connections, for which LD_PRELOAD is still not set automatically. -- 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)

