Re: Plasma5 user sessions
- Date: Fri, 2 Feb 2018 18:01:37 +0000
- From: David Edmundson <david@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: Plasma5 user sessions
Am 15.01.2018 um 20:07 schrieb Kai Uwe Broulik:
Thanks for your replayHi,
Sadly the mode "delay" is no option: since there is a globally set timeout for any delay, which is per default set to 5 sec and can be changed in /etc/systemd/logind.conf by setting InhibitDelayMaxSec. Setting this to a very high value would probably mean a high risk of breaking other uses cases (set to sleep?).We found out, that running a process with a systemd inhibitor as root e.g# systemd-inhibit --what=shutdown --mode=block sleep 365dTry mode "delay", this will temporarily delay the action until you release your inhibition. Typically used for certain cleanup tasks, like disconnecting the network, before sending the computer to sleep but according to documentation this works also for "shutdown" command. Check out the Logind inhibition documentation .
Another Problem is, that in order to prevent the system from being shutdown the inhibitor has to be set by root (or at least by a different user than the dbus command is sent). In my opinion this is a implementation flaw in systemd and contradicts some uses cases listed at the beginning of https://www.freedesktop.org/wi
At this point it would be extremely complicated to use inhibitors to achieve our goal. The only way would be a system daemon which sets a block inhibitor for shutdown and watches all user sessions and releases the inhibitor only if there is no user session running. This would however render the shutdown button in plasma useless.
Probably this is how KDM worked with utmp or ConsoleKit before. Correct me if I am wrong, but in the old days the user session would always reuse the x-server from the display manager. So naturally when the user session ends the display manager would naturally regain control.As for the warning when shutting down with multiple users, I that might be an SDDM limitation/bug/missing feature.
But now the kdisplaymanager code send messages to logind via dbus, which then just killes the session. Any code after the comment in "startkde":
> #Anything after here is logout/shutdown
is definitely not executed on shutdown.
$XDG_DATA_DIRS/plasma-workspace/shutdown and executable will be run blocking in alphabetical order and run until completed before we actually execute the shutdown/logout.
(make sure you have 1dc7f11692a4096b9815ae24f7be9cec10f8f7a5 in plasma-workspace)
You should be able to sync there.
- Prev by Date: Re: Need enlightenment on bug 318998; Add option to exit after printing
- Next by Date: Adding application to KDE and getting image of current cursor under wayland
- Previous by thread: Re: Plasma5 user sessions
- Next by thread: Re: Plasma5 user sessions