Although I use Windows as well and our blog has primarily been about Windows so far, I also use Linux regularly. I just installed Debian Jessie on my work PC and noticed that none of the shutdown actions work from the GUI. The Desktop Environment I've installed is Mate, the fork of the good old Gnome 2. Every time I try to execute some shutdown action, the system requests for the root password. In this article, I would like to share with you an easy way to get it working and get rid of the root password request.
Just follow these instructions:
- Open your favorite terminal and switch to the root session.
- Make sure you have installed the cksession and policykit packages. If not, install them (for Mate DE, I will install a policykit agent too):
# apt-get install policykit-1 mate-polkit consolekit
- After you get these packages installed, you need to correct the policies to allow normal users to shutdown your PC. This can be done with simple file editing.
Again, from the root terminal you should edit the following text file (I prefer mcedit as my text editor):
It is a regular XML file.
Find the following line:
Correct the sections inside the action block to make it look like this:
<action id="org.freedesktop.login1.power-off"> <description>Power off the system</description> <message>Authentication is required for powering off the system.</message> <defaults> <allow_any>yes</allow_any> <allow_inactive>yes</allow_inactive> <allow_active>yes</allow_active> </defaults> </action>
- Edit the defaults block similar to the example above in the following sections:
<action id="org.freedesktop.login1.power-off-multiple-sessions"> <action id="org.freedesktop.login1.reboot"> <action id="org.freedesktop.login1.reboot-multiple-sessions"> <action id="org.freedesktop.login1.suspend"> <action id="org.freedesktop.login1.suspend-multiple-sessions"> <action id="org.freedesktop.login1.hibernate"> <action id="org.freedesktop.login1.hibernate-multiple-sessions">
That's it. Now simply reboot your OS (in my case, it started working even without rebooting). The power actions will now work without gksu/elevation requests.