mythbuntu: can't shutdown from MythTV

Bug #368594 reported by Russell Phillips
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
policykit (Ubuntu)
New
Undecided
Unassigned
Nominated for Karmic by Karel Marik

Bug Description

Binary package hint: policykit

In mythtv (mythbuntu jaunty), when I select 'Exit and Shutdown', the machine does not shut down, and the following error is printed to the mythfrontend.log file:

org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.shutdown-multiple-sessions auth_admin

I cannot shut down from the xfce logout menu either - for the same reason.

I have narrowed the problem to the configuration in '/usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy':

  <action id="org.freedesktop.hal.power-management.shutdown-multiple-sessions">
    <description>Shut down the system when multiple users are logged in</description>
    <message>System policy prevents shutting down the system while multiple users are logged in</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
  </action>

If I change 'auth_admin' to 'yes', I am able to shutdown directly from MythFrontend and xfce.

This currently occurs on an out-of-the-box frontend configuration.

Revision history for this message
James Westby (james-w) wrote :

Hi,

What should happen is that you are prompted to auth as an admin
user.

Is "policykit-gnome" installed?

What actually is it that provides the "Exit and Shutdown" button?

Thanks,

James

Revision history for this message
Russell Phillips (ignissport) wrote :

PolicyKit is definitely installed.

In MythTV, the "Exit & Shutdown" button calls the script '/usr/share/mythtv/myth-halt.sh'. It contains the following line:

dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown

Now it seems obvious - this ONLY happens when I'm also logged in through SSH (which explains the whole 'multiple user' thing)

However, it doesn't prompt to auth as admin (the user running as GUI is a sudoer). When I tell MythTV to shutdown, it exits back to the desktop. When I select shutdown from the xfce menu, it displays the following message:

Unable to perform shutdown
org.freedesktop.hal.power-management.shutdown-multiple-sessions auth_admin <-- (action, result)

Revision history for this message
Russell Phillips (ignissport) wrote :

I just checked my mythbackend.log file after attempting a shutdown, it contains this line:

Error org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.shutdown-multiple-sessions auth_admin <-- (action, result)

Looks like both have the same problem.

Revision history for this message
Russell Phillips (ignissport) wrote :

I just checked my mythfrontend.log file after attempting a shutdown, it contains this line:

Error org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.shutdown-multiple-sessions auth_admin <-- (action, result)

Looks like both have the same problem.

Revision history for this message
Karel Marik (kaja-marik) wrote :

Same (or similar) problem in Karmic Koala. When restarting or shutting down then message "System Policy prevents stopping the system when other users are logged in" appears. Then I have to write admin password. It is quite annoying for my children are unable shut down computer as they don't have admin privileges.

I have found same problem described here: http://ubuntuforums.org/showthread.php?t=1299948

Revision history for this message
Lurchman (k-launchpad-loowis-durge-org) wrote :

Karel: I believe this is the relevant bug for mythtv in Karmic:
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/445953
It contains a simple fix that "worked for me" :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.