Hi, in our work we have a setup where a PC is used by many different users under a variety of desktop environments. The PC has several monitors and we use a xrandr script to setup them correctly (independent of the graphical session) as soon as an user starts an arbitrary graphical session. We recently switched from Ubuntu (LightDM) to Debian (GDM, both with systemd). On Ubuntu, the login manager started a user target "graphical-session.target" and we crafted a service that executes our script and was "wanted" by this target. On Debian, no such "graphical-session.target" exists, only a "default.target". If we put our service as "wanted by" the "default.target", it is not always executed when the graphical session is up, so xrandr does not work and so on. My question is: logind should know when an (arbitrary) graphical session is up. Is there a possibility to trigger systemd to execute some script under the current user when logind detects a new graphical session? This way, it would not depend on the login manager and desktop environment. The broader question is: Is there a way to start a script at the beginning of a graphical session (but after X or the Wayland compositor have started) which is independent of the login manager or desktop environment? Best, Gerion
Attachment:
smime.p7s
Description: S/MIME cryptographic signature