Fallback to in-process prompt if logout prompt fails
ClosedPublic

Authored by davidedmundson on Oct 1 2018, 8:49 AM.

Details

Summary

KSmserver is currently very heavily tied to the shutdown prompt dialog.
On upgrades a user ends up in a situation where they have an old
ksmserver running but a newer shutdown dialog. This has caused issues
repeatedly in the past.

I want to make some changes to how the shutdown prompt is shown for
5.15. First step is making the old releases more robust.

Prompt looks ugly but a user will only see it at most once. Hopefully
never.

Test Plan

rm'd the greeter
Got an ugly messagebox instead of nothing

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.Oct 1 2018, 8:49 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 1 2018, 8:49 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Oct 1 2018, 8:49 AM
broulik added a subscriber: broulik.Oct 1 2018, 9:49 AM

Wasn't the whole point of making the greeter binary out of process to cover cases where there is a version mismatch after updates?

It was.The situation is now much much much better.
But kscreenlocker-greet is a different process, and we've definitely seen that fallback prompt shown.

Also I don't like the way it was done. It was done as a conservative exact 1:1 mapping of the original code with a FD in the middle rather than designing something.

All that was needed was:

  • spawn logout prompt (probably DBus activation to avoid dupes) as fire-and-forget
  • logout prompt using the existing ksmserver API to perform logout/shutdown over DBus with the "don't confirm" argument set

In my quest to strip ksmserver to being just an X session manager, I want to do the refactor above so that it's then highly movable.

I think I can do everything in a backwards compatible way for each release, I'm not sure about doing every possible upgrade combo.

broulik accepted this revision.Oct 1 2018, 11:06 AM

Has a nice Windows 3.1 flair to it

This revision is now accepted and ready to land.Oct 1 2018, 11:06 AM
ngraham requested changes to this revision.Oct 1 2018, 1:19 PM
ngraham added a subscriber: ngraham.
ngraham added inline comments.
ksmserver/shutdown.cpp
227

Shutdown -> Shut Down

"Shutdown" is a noun ("The nuclear reactor is experiencing a shutdown!")

"Shut Down" is an imperative command with a verb ("Shut down the nuclear reactor!"), which is how everything else is phrased.

I will submit a patch to fix this elsewhere too, but let's also try to avoid perpetuating this grammar error in new code.

This revision now requires changes to proceed.Oct 1 2018, 1:19 PM
davidedmundson added inline comments.Oct 1 2018, 1:36 PM
ksmserver/shutdown.cpp
227

see my comment above the i18n line

This revision was not accepted when it landed; it landed in state Needs Revision.Oct 1 2018, 1:48 PM
This revision was automatically updated to reflect the committed changes.