New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i3 session does not activate systemd graphical-session.target #5186
Comments
Please note that new features which require additional configuration will usually not be considered. We are happy with the feature set of i3 and want to focus in fixing bugs instead. We do accept feature requests, however, and will evaluate whether the added benefit (clearly) outweighs the complexity it adds to i3. Keep in mind that i3 provides a powerful way to interact with it through its IPC interface: https://i3wm.org/docs/ipc.html. |
plasma-workspace also uses BindsTo=graphical-session.target: https://codesearch.debian.net/search?q=BindsTo%3Dgraphical-session I think we’ll need to switch to starting the i3 session via systemd in order to fulfill this feature request. We can probably use There is some background info in https://people.debian.org/~mpitt/systemd.conf-2016-graphical-session.pdf, though I’m not sure how relevant it is, given that it’s from 2016. Pull requests for this change are welcome, but I most likely won’t work on this myself. |
Are there any plans on doing this? Am I right in thinking these could easily be adapted to be included in i3 directly and |
As I wrote previously:
|
This seems like a related discussion to me: https://pagure.io/i3-sig/Fedora-i3-Spin/issue/50 (see also the linked repo in that issue: https://github.com/alebastr/sway-systemd#session-target). |
My very simple workaround is to have these unit files:
and finally, just start
this works very well to start up the graphical session, but launched applications are not cgrouped yet. the missing part is stopping the graphical session - I couldn't find a reliable way of stopping the if we had a |
Why not provide i3wm as a unit? and start it as part of the graphical-session.target?
^ I think this way i3 is simply started as part of the graphical session. |
Also possible, but then all in-i3 started programs are part of the i3 service scope (cgroup). I want them to be part of the user slice session scope. One could also do this by having the launchers start new programs with |
Not necessarily if i3 trigger the launcher all programs started by the
launcher are in the launchers scope (usually the user slice, as you said
too).
This merely affects programs such as the bar program or picom if you
don't start it with a user service.
You still execute i3 outside of the systemd user session if you don't
start it as a service (or inside another service).
|
How would you do that? And with which launcher and config? :) |
Krunner.
The launcher is activated using DBus Activation.
|
I'm submitting a…
Note: The report is targeting Debian but applies to i3 in general.
Forwarded from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003816.
systemd defines a special (user) target called graphical-session.target
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:
If I understood the clarifications in a
thread
on systemd's mailing list and the linked
slides
correctly, this target should be activated by specifying the session in question
as a systemd service with
BindsTo=graphical-session.target
and launching thisservice from the relevant
/usr/share/xsessions/*.desktop
instead of launchingthe session directly.
In i3's case, the
/usr/share/xsessions/i3.desktop
session definition isprovided 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 compatibilitywith 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
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.
The text was updated successfully, but these errors were encountered: