[Sugar-devel] [PATCH] use ConsoleKit instead of HAL for shutdown/reboot

James Cameron quozl at laptop.org
Tue Apr 20 20:32:28 EDT 2010

On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:
> Hi James/Sascha,
>    > Reviewed-by: James Cameron <quozl at laptop.org>
> Did you test on XO-1 or XO-1.5?  I'm curious how much of a backwards-
> compatibility break this is.

No, I only did a code review and cross-check against ConsoleKit API

However, I've just applied the patch on os119 on XO-1.5, restarted Sugar
and tested Restart and Shutdown options, and they function correctly.
Restart causes a UL screen and reboot.  Shutdown causes a UL screen and
power off.

Tested-by: James Cameron <quozl at laptop.org>

Now, if one also stops HAL, the shutdown or restart options don't work,
and shell.log says:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/sugar/session.py", line 50, in __shutdown_completed_cb
  File "/usr/lib/python2.6/site-packages/jarabe/model/session.py", line 64, in shutdown_completed
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.ConsoleKit.Manager.NotPrivileged: Not privileged for action: org.freedesktop.consolekit.system.restart-multiple-users auth_admin_keep_always

James Cameron

More information about the Sugar-devel mailing list