[plasma-session] Load startup and shutdown on demand
ClosedPublic

Authored by davidedmundson on Feb 24 2020, 5:56 PM.

Details

Summary

Currently startplasma spawns plasma-session then sits around waiting for
that to finish

plasma-session spawns all the startup then also just sits around doing
nothing

This patch makes plasma-session spawn all the startup and then quit.

It also splits the owner of the org.kde.shutdown interface to be on
demand. plasma-shutdown asks ksmserver to quit and then if applicable
runs the shutdown scripts or not.

Startplasma then knows when to exit by monitoring the DBus service
status directly.

The benefits are that we save some resources by not needing
plasma-session lingering about.

It also means the shutdown interface is re-usable as-is when the pending
systemd startup method is used.

Test Plan

Logged in and:

  • ran killall ksmserver, session ended as before
  • logged out and cancelled due to unsaved changes
  • logged out and completed logout
  • logged out and rebooted

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Feb 24 2020, 5:56 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 24 2020, 5:56 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 24 2020, 5:56 PM
apol accepted this revision.Feb 24 2020, 6:07 PM
apol added a subscriber: apol.

+1 patch makes sense to me overall.

startkde/startplasma.cpp
396–398

You might want to check if start() returns an error.

This revision is now accepted and ready to land.Feb 24 2020, 6:07 PM
This revision was automatically updated to reflect the committed changes.