<sz5lm3NCXzKnV65nir1fB7hFZ_Wglm4zRsKJyMTSweozDFTz5EGx2D87Sqa3PVi8qnJtwLrvh9DzGys-PB1-owsmozjz9jviTJShWUVjMkI=@samcday.com>
Hiya, I was looking through the available greetd greeters and it occurred to me that virtually all of them are doing the legwork to find the list of valid X11/Wayland sessions: * https://gitlab.com/marcusbritanicus/QtGreet/-/blob/main/src/widgets/session/session.cpp#L60 * https://github.com/deathowl/ddlm/blob/master/src/main.rs#L437 * https://github.com/rharish101/ReGreet/blob/main/src/sysutil.rs#L157 * https://github.com/Decodetalkers/greetd-qmlgreet/blob/603cad4dcb57be129d25df3fbc373809d021fce0/src/DesktopListModel.cpp#L10 * https://github.com/Decodetalkers/marine_greetdm/blob/master/desktopparse/src/lib.rs#L61 Outside of greetd, it's more of the same: * https://github.com/GNOME/gdm/blob/c732f814ff6fc1cde53fdc30496bfe62b11bd081/libgdm/gdm-sessions.c#L246 * https://github.com/Obsidian-StudiosInc/entrance/blob/master/src/daemon/entrance_session.c#L473 * https://github.com/canonical/lightdm/blob/8c22a5100f04c30be034cc12d9058ee88c6329d5/liblightdm-gobject/session.c#L116 * https://github.com/GalliumOS/lxdm/blob/7aeab6a9dc589f71999eb8de05033733b5f2dd9e/src/lxdm.c#L587 * https://github.com/sddm/sddm/blob/develop/src/common/Session.cpp#L40 I was curious if it might make sense for greetd to do this work once, and then offer the list to the greeters via some sort of IPC mechanism. -Sam
<a0e1c85a-f472-4290-8d90-ea6555e532ca@kl.wtf>
<sz5lm3NCXzKnV65nir1fB7hFZ_Wglm4zRsKJyMTSweozDFTz5EGx2D87Sqa3PVi8qnJtwLrvh9DzGys-PB1-owsmozjz9jviTJShWUVjMkI=@samcday.com>
(view parent)
My original stance was that I did not like the over-complicated use of .desktop files and their built-in assumptions about the type of session being started. greetd was designed to make no assumptions about what is being run, which is why it just handles plan command-lines. For an X11 session file, it assumes you're going to pick a DISPLAY value, deal with xauth, start an X11 server and wait for it to be ready, and only then run the specified command. On the contrib branch, I made some example shell scripts that could be used to interact with such session definitions without any code in greetd.