Comment 34 for bug 432598

Revision history for this message
Martin Pitt (pitti) wrote : Re: provide a way to disable suspend/hibernate

In particular, you have to install a file like this for an OEM package:

$ sudo cat /var/lib/polkit-1/localauthority/10-vendor.d/disable-suspend.pkla
[Disable suspend]
Identity=unix-user:*
Action=org.freedesktop.devicekit.power.suspend;org.freedesktop.devicekit.power.hibernate
ResultActive=no
ResultAny=no

If you set this up locally, you should rather put it into /etc/polkit-1/localauthority/50-local.d/ .

Test:

$ pkcheck --action-id org.freedesktop.devicekit.power.suspend --process $$
Not authorized.