Can’t Restart, Shutdown via dbus-send org.freedesktop.ConsoleKit with SLiM

by kiawin

I faced this problem when SLiM no longer support ck-launch-session, and it fail to allow dbus-send to restart, shutdown via org.freedesktop.ConsoleKit.

Apparently this is due to access rights as specified in PolicyKit.

Just head towards your favourite text editor in super user mode and create relevant pkla.

#1 – /etc/polkit-1/localauthority/50-local.d/org.freedesktop.restart.pkla

[Local Users]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.restart-multiple-users
ResultAny=no
ResultInactive=no
ResultActive=yes

#2 – /etc/polkit-1/localauthority/50-local.d/org.freedesktop.shutdown.pkla

[Local Users]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultAny=no
ResultInactive=no
ResultActive=yes

The setting will kick in after a reboot. Enjoy :)