Commit fd190035 authored by David Edmundson's avatar David Edmundson
Browse files

[systemd] Clear up units

Plasma core is moved away from being a template. This makes it easier
for others to mark themselves as being after. A new readme is added to
explain the design.
parent e389479e
[Unit]
Description=Proxies GTK DBus menus to a Plasma readable format
PartOf=graphical-session.target
After=plasma-core.target
[Service]
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/gmenudbusmenuproxy
......
[Unit]
Description=KDE Session Management Server
After=plasma-ksmserver.service plasma-xembedsniproxy.service plasma-gmenudbusmenuproxy.service
After=graphical-session.target
RefuseManualStart=yes
[Service]
Type=oneshot
ExecStart=-@QtBinariesDir@/qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSession
Slice=session.slice
RefuseManualStart=yes
ecm_install_configured_files(INPUT plasma-ksplash-ready.service.in @ONLY
DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
install(FILES plasma-core@.target DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
install(FILES plasma-core.target DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
install(FILES plasma-workspace@.target DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
add_executable(kde-systemd-start-condition kde-systemd-start-condition.cpp)
......
# Startup
Startup can be summarised as being:
plasma-core.target
plasma-workspace@.target
graphical-session.target
plasma-workspace@ is the target explicitly activated.
## X11 and wayland
plasma-workspace@ is a template file that ends with x11 or wayland. That will then require the correct kwin_
startup order can be different between the two.
## Wants & Order
Note that in systemd dependencies (wants/wantedby) counter-intuitively do not determine order.
plasma-workspace wants graphical-session, meaning it will make it something started by it, but it also explicitly comes before graphical-session.
The order of events is:
plasma-core does anything that adjusts environment variables
plasma-workspace@ starts all runtime services
graphical-session is at a point where everything including runtime services are up
## Adding a new service
If it should only be used on plasma it should be wanted by plasma-core or plasma-workspace@.
That service is responsible for setting "After=plasma-core.target" if we need envs set up.
[Unit]
Description=KDE Plasma Workspace Core
Wants=plasma-plasmashell.service plasma-kwin_%i.service plasma-kcminit.service plasma-kded.service plasma-kcminit-phase1.service graphical-session-pre.target
Wants=plasma-plasmashell.service plasma-kcminit.service plasma-kded.service plasma-kcminit-phase1.service graphical-session-pre.target
Requires=plasma-ksmserver.service
BindsTo=plasma-ksmserver.service
After=graphical-session-pre.target
RefuseManualStart=yes
[Unit]
Description=KDE Plasma Workspace
Requires=plasma-core@%i.target plasma-ksplash-ready.service
Requires=plasma-kwin_%i.service plasma-core.target xdg-desktop-autostart.target graphical-session.target
Wants=plasma-restoresession.service plasma-xembedsniproxy.service plasma-gmenudbusmenuproxy.service plasma-powerdevil.service plasma-ksplash-ready.service
BindsTo=graphical-session.target
Wants=xdg-desktop-autostart.target plasma-xembedsniproxy.service plasma-gmenudbusmenuproxy.service plasma-restoresession.service
After=plasma-core.target
Before=graphical-session.target xdg-desktop-autostart.target plasma-ksplash-ready.service plasma-restoresession.service
[Unit]
Description=Handle legacy xembed system tray icons
PartOf=graphical-session.target
After=plasma-core.target
[Service]
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/xembedsniproxy
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment