Wants says we should bring ksmserver up, but by default that could be in
any order, we need to define it. kcminit also potentially exports
environment variables.
This was written with the correct order in-mind but the wrong keyword
used. We don't need "Wants" as plasma-core.target already defines that
we will be loading them along with plasmashell.
It is important that ksmserver is up and has completed exporting the
SESSION_MANAGER env, otherwise plasmashell will not propogate it so
applications it launches introducing an X session regression
This means on logout we'll be gracefully closed down.
All of these are closing down properly anyway, but this makes things a
bit more explicit in case you managed to log out at an awkward point.
Summary:
This brings numerous advantages such as:
- easier admin configuration with drop-ins, overrides and multiple
hooks throughout (and only having to learn one tool)
- session cleanup on exit, avoiding that occasional part where shutdown
hangs
- startup that actually knows when things are up
- race free autostart and DBus activation at once
- logs that rotate are split by service and usable
- resource management through slices and cgroups (the part I want)
Over the past 2 years I've been trying to tidy up and encapsulate the
relevant parts of startup into the binary plasma-session so that we can
just runtime swap out that one part and supporting both paths will be
easy.
Support is toggleable via cmake flag, as it seems like it should be a
distro decision, especially as we will require a specific systemd with
the xdg-generator.
KDED/kwin/other services are attached to the relevant repo.
Task T11914
Differential Revision: https://phabricator.kde.org/D28305
squash