Reboot/Shutdown problem to execute (hal & dbus & PolicyKit)

Bug #527125 reported by Roman Sergeev
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OBLogout
New
Undecided
Unassigned

Bug Description

error executing this commands:
cmd_shutdown = "dbus-send --system --dest=org.freedesktop.Hal --type=method_call --print-reply /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown"
    cmd_restart = "dbus-send --system --dest=org.freedesktop.Hal --type=method_call --print-reply /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Reboot"

Log (reboot command):
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/oblogout/__init__.py", line 354, in click_button
    self.dbus.restart()
  File "/usr/lib/python2.6/site-packages/oblogout/dbushandler.py", line 143, in restart
    if not self.__auth_perms("org.freedesktop.hal.power-management.reboot"):
  File "/usr/lib/python2.6/site-packages/oblogout/dbushandler.py", line 94, in __auth_perms
    if self.__check_perms(id):
  File "/usr/lib/python2.6/site-packages/oblogout/dbushandler.py", line 80, in __check_perms
    res = self._polkit.IsProcessAuthorized(id, os.getpid(), False)
  File "/usr/lib/python2.6/site-packages/oblogout/dbushandler.py", line 50, in _polkit
    pk = self._sysbus.get_object ("org.freedesktop.PolicyKit", "/")
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/libexec/dbus-daemon-launch-helper: Success

OS - gentoo
python 2.6 & 3.1

Revision history for this message
mark (mark-voidzero) wrote :

Same problem occus with me on Archlinux.

Revision history for this message
illumin8 (illumin8media) wrote :

Same problem in Openbox Arch.

Revision history for this message
Ravenman (correo-cuervo) wrote :

Same problem in Archbang.

Revision history for this message
Ternia (twilite) wrote :

The very same in Ubuntu 10.04.

Revision history for this message
STEELBAS (steelbas) wrote :
Revision history for this message
STEELBAS (steelbas) wrote :

...For a solution.

Revision history for this message
Andrew Williams (nikdoof) wrote : Re: [Bug 527125] Re: Reboot/Shutdown problem to execute (hal & dbus & PolicyKit)

A second problem here is that the Arch Linux AUR package has a bit of a
stupid patch in it, where the package maintainer decided to rip out half of
the command code and replace it with a older version.

Using a fresh Git/Bzr copy with Arch may help your issues, but i've never
been able to get DBUS controlled startup/shutdown working under Arch due to
numerous smaller issues.

--
Andrew Williams
w: http://tensixtyone.com/
e: andy (at) tensixtyone.com

Revision history for this message
Bernhard (b.a.koenig) wrote :

Adding the following to my .xinitrc fixed this issue for me:

exec ck-launch-session dbus-launch openbox-session

it seems to be important that ck-launch-session appears before dbus-launch, i.e. the order matters.

Revision history for this message
Bernhard (b.a.koenig) wrote :

Sorry, of course you don't need to add "openbox-session" if you are not running openbox. The crucial point seems to be that ck-launch-session appears before the dbus-launch.

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.