Bug 294714

Summary: KDE doesn't use ConsoleKit (or systemd-loginctl) to shutdown or restart the machine
Product: [Plasma] ksmserver Reporter: Tamás Németh <nt1277>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED FIXED    
Severity: normal CC: adaptee, arthur, cfeck, diego.viola, dschridde+kde, egorov_egor, filip.brcic, kensington, rdieter, scarpino, suportevg, teg, zerg
Priority: NOR    
Version: 4.7.x   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: first attempt at implementing native systemd restart/shutdown support

Description Tamás Németh 2012-02-23 21:07:23 UTC
Version:           4.7 (using KDE 4.7.2) 
OS:                Linux

KDE doesn't use ConsoleKit (or systemd-loginctl) to shutdown or restart the machine (or is it just a SuSE specific setting?), so it's impossible to ask for authentication for such task by copying /var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.consolekit.system.stop (or similar) to /etc/polkit-1/localauthority/50-local.d (or similar) and then editing it.

Reproducible: Always

Steps to Reproduce:
Try to instruct PolicyKit to ask for authentication for ConsoleKit/systemd@DBus based shutdown/restart.

Actual Results:  
Sadly, it won't affect KDE :-(

Expected Results:  
I assume it would be better if PolicyKit were able to control KDE's shutdown/restart behavior.

BTW, how does KDE shutdown/restart the system if not using DBus services?
Comment 1 Andrea Scarpino 2012-03-07 17:42:11 UTC
I guess this is a stopper for BUG#293978
Comment 2 Rex Dieter 2012-03-13 20:47:24 UTC
consolekit integration is only restorted to only if one isn't using kdm login manager. Else, kdm uses it's own native methods (generally by calling what's defined in kdmrc
HaltCmd=
RebootCmd=
Comment 3 Rex Dieter 2012-03-13 20:49:06 UTC
Followup, in fedora we're working on providing similar native systemd support for shutdown/reboot (and hopefully switchuser) support too.  ReviewBoard patch coming soon I hope.
Comment 4 Rex Dieter 2012-03-14 18:25:33 UTC
Created attachment 69618 [details]
first attempt at implementing native systemd restart/shutdown support

Work in progress patch to support native systemd reboot/shutdown methods.  user switching is still largely untested (so probably still needs work)
Comment 5 Michael Palimaka 2013-01-29 16:37:22 UTC
Rex, what is the current status of your patch - are you using it in Fedora, and is it ready for ReviewBoard?
Comment 6 Rex Dieter 2013-01-29 17:21:46 UTC
My bad for not following up, someone else picked up the torch, and got it reviewed and integrated into kde-4.10

https://reviewboard.kde.org/r/107611/
Comment 7 Michael Palimaka 2013-01-29 17:23:01 UTC
(In reply to comment #6)
> My bad for not following up, someone else picked up the torch, and got it
> reviewed and integrated into kde-4.10
> 
> https://reviewboard.kde.org/r/107611/

Thanks a lot for the info!