Logout messages
If you are opening a terminal to a different server or do a su in a terminal then on logout you will be required to enter your password in order to confirm the logout action. Since the polkit-gnome-authorization does not work with the new polkit version which ships with ubuntu and the polkit-auth command does not seems to work either I’ve found after some research that the solution resides in editing the /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<policyconfig>
<action id="org.freedesktop.consolekit.system.stop">
<description>Stop the system</description>
<message>System policy prevents stopping the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
<action id="org.freedesktop.consolekit.system.stop-multiple-users">
<description>Stop the system when multiple users are logged in</description>
<message>System policy prevents stopping the system when other users are logged in</message>
<defaults>
<allow_inactive>no</allow_inactive>
<strong> <span style="color: #ff0000;"><!--<allow_active>auth_admin_keep</allow_active>-->
<allow_active>yes</allow_active></span></strong>
</defaults>
</action>
<action id="org.freedesktop.consolekit.system.restart">
<description>Restart the system</description>
<message>System policy prevents restarting the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
<action id="org.freedesktop.consolekit.system.restart-multiple-users">
<description>Restart the system when multiple users are logged in</description>
<message>System policy prevents restarting the system when other users are logged in</message>
<defaults>
<allow_inactive>no</allow_inactive>
<span style="color: #ff0000;"><strong> <!--<allow_active>auth_admin_keep</allow_active>-->
<allow_active>yes</allow_active></strong></span>
</defaults>
</action>
</policyconfig>
This allows the current user to perform actions related to the following policies:
- org.freedesktop.consolekit.system.restart-multiple-users
- org.freedesktop.consolekit.system.stop-multiple-user
Remove osd style popups
These popups which inform from connections success to battery status to pidgin messages can be a little annoying but they are quite easy to remove:
cd /usr/share/dbus-1/services/
sudo mv org.freedesktop.Notifications.service org.freedesktop.Notifications.service.disabled
You can revert the action to get the default behavior.
Comments:
alice -
Thank you for the instructions! They worked perfectly! Alice
Stuphi » Blog Archive » You win some. You loose some. -
[…] someone ponted me towards required edit. Tags: policykit, printing, […]
Bob Wilton -
Many thanks. Instructions worked great.
Alex Szabados -
Exactly what I was looking for! Many thanks.
Contra -
I also did this worked perfectly
Lori Reed -
Many thanks. This allows me to cleanly shut down my MythTV (MythBuntu) DVR system by pressing the computer’s power button.
radix -
Thanks a lot! BTW do you know a way to disable consolekit? That useless thing runs 64 threads stealing memory (but not cpu) and I don’t want it on my machine. Unfortunately, xorg and other stuff depend on it, so I cannot simply uninstall it (network manager wouldn’t even start). But if I do a killall console-kit-daemon after booting is complete, then everything seems to work fine. Is there a way to disable it from config files?
len -
Sorry radix, I think google is your friend on this.
Modified Linux Shutdown Policy running from USB « Node28 -
[…] found a fix at Len’s site which solved my problem. I am posting the modified org.freedesktop.consolekit.policy at my […]
Krew, pot i łzy … Ubuntu 10.04 cz.1 « by yp2 -
[…] Rozwiązanie zaczerpnięte z http://www.len.ro/2009/11/karmic-various-tricks/ […]
Darko -
I tied, but does not work for me….:( yc@fyc:/usr/share/dbus-1/services$ sudo mv org.freedesktop.Notifications.service org.freedesktop.Notifications.service.disabled mv: cannot stat `org.freedesktop.Notifications.service': No such file or directory
len -
@Darko: it might depend on your distribution. On my Lucid Lynx (Ubuntu 10.04) the file exists: ls -l /usr/share/dbus-1/services/org.freedesktop.Notifications.service -rw-r–r– 1 root root 449 2010-04-14 14:15 /usr/share/dbus-1/services/org.freedesktop.Notifications.service
darko -
Never mind… I put changes in org.freedesktop.consolekit.policy file as you suggested yes and it works now. thks