[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.
wilder-5.22
David Edmundson 6 years ago
parent e389479ec8
commit fd190035d9
  1. 1
      gmenu-dbusmenu-proxy/plasma-gmenudbusmenuproxy.service.in
  2. 4
      ksmserver/plasma-restoresession.service.in
  3. 2
      startkde/systemd/CMakeLists.txt
  4. 30
      startkde/systemd/README.md
  5. 7
      startkde/systemd/plasma-core.target
  6. 6
      startkde/systemd/plasma-core@.target
  7. 6
      startkde/systemd/plasma-workspace@.target
  8. 1
      xembed-sni-proxy/plasma-xembedsniproxy.service.in

@ -1,6 +1,7 @@
[Unit] [Unit]
Description=Proxies GTK DBus menus to a Plasma readable format Description=Proxies GTK DBus menus to a Plasma readable format
PartOf=graphical-session.target PartOf=graphical-session.target
After=plasma-core.target
[Service] [Service]
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/gmenudbusmenuproxy ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/gmenudbusmenuproxy

@ -1,9 +1,9 @@
[Unit] [Unit]
Description=KDE Session Management Server Description=KDE Session Management Server
After=plasma-ksmserver.service plasma-xembedsniproxy.service plasma-gmenudbusmenuproxy.service After=graphical-session.target
RefuseManualStart=yes
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=-@QtBinariesDir@/qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSession ExecStart=-@QtBinariesDir@/qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.restoreSession
Slice=session.slice Slice=session.slice
RefuseManualStart=yes

@ -1,7 +1,7 @@
ecm_install_configured_files(INPUT plasma-ksplash-ready.service.in @ONLY ecm_install_configured_files(INPUT plasma-ksplash-ready.service.in @ONLY
DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR}) 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}) install(FILES plasma-workspace@.target DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
add_executable(kde-systemd-start-condition kde-systemd-start-condition.cpp) add_executable(kde-systemd-start-condition kde-systemd-start-condition.cpp)

@ -0,0 +1,30 @@
# 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.

@ -0,0 +1,7 @@
[Unit]
Description=KDE Plasma Workspace Core
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

@ -1,6 +0,0 @@
[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
Requires=plasma-ksmserver.service
BindsTo=plasma-ksmserver.service
After=graphical-session-pre.target

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=KDE Plasma Workspace 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 BindsTo=graphical-session.target
Wants=xdg-desktop-autostart.target plasma-xembedsniproxy.service plasma-gmenudbusmenuproxy.service plasma-restoresession.service Before=graphical-session.target xdg-desktop-autostart.target plasma-ksplash-ready.service plasma-restoresession.service
After=plasma-core.target

@ -1,6 +1,7 @@
[Unit] [Unit]
Description=Handle legacy xembed system tray icons Description=Handle legacy xembed system tray icons
PartOf=graphical-session.target PartOf=graphical-session.target
After=plasma-core.target
[Service] [Service]
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/xembedsniproxy ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/xembedsniproxy

Loading…
Cancel
Save