[Sugar-devel] [PATCH] use ConsoleKit instead of HAL for shutdown/reboot
Paul Fox
pgf at laptop.org
Tue Apr 20 20:37:54 EDT 2010
james wrote:
> 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
> documentation.
>
> 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.
so, can someone tell me (gently) why either of these techniques
is better than simply invoking /bin/reboot or /bin/shutdown?
(other than the fact that those will work even if hal isn't
running?)
paul
>
> 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
> self.shutdown_completed()
> File "/usr/lib/python2.6/site-packages/jarabe/model/session.py", line 64, in
> shutdown_completed
> pm.Restart()
> 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__
> **keywords)
> 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
> http://quozl.linux.org.au/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
=---------------------
paul fox, pgf at laptop.org
More information about the Sugar-devel
mailing list