Package: i3 Version: 4.19.1-1 Severity: wishlist X-Debbugs-Cc: smheidr...@weltenfunktion.de
systemd defines a special (user) target called graphical-session.target [1] which should be active when the user is logged into a graphical session. Currently, when I'm logged into a default i3 session (entered via GDM), this target is inactive: $ systemctl --user status graphical-session.target ● graphical-session.target - Current graphical user session Loaded: loaded (/usr/lib/systemd/user/graphical-session.target; static) Active: inactive (dead) Docs: man:systemd.special(7) If I understood the clarifications in a thread [2] on systemd's mailing list and the linked slides [3] correctly, this target should be activated by specifying the session in question as a systemd service with BindsTo=graphical- session.target and launching this service from the relevant /usr/share/xsessions/*.desktop instead of launching the session directly. In i3's case, the /usr/share/xsessions/i3.desktop session definition is provided by the i3-wm package and just launches i3 directly. This makes perfect sense, as systemd isn't mandatory on Debian and the aforementioned session-as- service mechanism wouldn't work at all for people using SysVinit. But perhaps there could be two session definitions, one with and one without an associated systemd service? An objection I expect is that users should just write their own session files if they need this "feature", but the same would apply to the default /usr/share/xsessions/i3.desktop file, which is only included for compatibility with common display/login managers. Ditto for the argument that this is out of scope for a window manager and gets into desktop environment territory. Besides, it's not merely a missing feature but a bug (not necessarily in the i3 package but somewhere in the Debian distribution): Promises that are made in systemd's documentation [1] are not kept when using distribution-provided graphical session definitions. Unfortunately, the only precedent for this type of session file in other window manager or desktop environment packages I could find is in the gnome-session- common package (apt-file search session.target), so perhaps it would in fact be better to provide this via a separate package? There are a bunch of packages for the Openbox window manager that do nothing but provide sessions for running it along with the non-WM processes of common desktop environments (openbox- gnome-session, openbox-lxde-session, openbox-kde-session, ...), so a package providing only a session file for running i3 in a systemd-compatible manner doesn't sound totally unreasonable to me. This could then be suggested by the i3 package. Let me know your thoughts. Kind regards [1]: https://www.freedesktop.org/software/systemd/man/systemd.special.html#graphical- session.target [2]: https://systemd-devel.freedesktop.narkive.com/J9pItAjq/graphical-session- targets-as-standard#post10 [3]: https://people.debian.org/~mpitt/systemd.conf-2016-graphical-session.pdf -- System Information: Debian Release: 11.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'oldoldstable'), (500, 'stable'), (500, 'oldstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.0-10-amd64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages i3 depends on: ii i3-wm 4.19.1-1 Versions of packages i3 recommends: ii dunst 1.5.0-1 ii i3lock 2.13-1+b1 ii i3status 2.13-3 ii suckless-tools 46-1 i3 suggests no packages.