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

2010-04-25 Thread Bernie Innocenti
On Wed, 2010-04-21 at 10:32 +1000, James Cameron wrote:

 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.

As we're there, how do we get rid of the useless UL screen with its ugly
inverted color scheme?

Moreover, the UL screen fights with powerd's pretty shutdown screens.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-25 Thread Paul Fox
bernie wrote:
  On Wed, 2010-04-21 at 10:32 +1000, James Cameron wrote:
  
   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.
  
  As we're there, how do we get rid of the useless UL screen with its ugly
  inverted color scheme?

i believe the UL screen is mandated, but i don't know the details.  i.e.,
we may not have a choice.

paul
=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-25 Thread James Cameron
On Sun, Apr 25, 2010 at 11:46:41AM -0400, Bernie Innocenti wrote:
 As we're there, how do we get rid of the useless UL screen with its ugly
 inverted color scheme?

For OLPC builds we'd need a product safety review to remove it.  ;-)

For deployment builds, you could hide /usr/sbin/ul-warning ... I've
tested this and the result is that X goes away, the text console
displays a few messages from init, and then the power goes off.  Is that
the behaviour you need?

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread Sascha Silbe

On Wed, Apr 21, 2010 at 01:18:53PM +1000, James Cameron wrote:

dbus.exceptions.DBusException: 
org.freedesktop.ConsoleKit.Manager.NotPrivileged: Not privileged for 
action: org.freedesktop.consolekit.system.restart-multiple-users 
auth_admin_keep_always
After the patch is applied, Sugar's shutdown and restart options fail 
if

there are multiple logged in users; via SSH or text console.
Just digged around a bit; while both ConsoleKit and HAL go through 
PolicyKit for authentication, the names of the configuration variables 
differ.
Since I've run into the same issue before (i.e. with HAL), I suppose the 
default is the same but the OLPC builds explicitly configure HAL to 
allow shutdowns even for multiple sessions?


CU Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/

signature.asc
Description: Digital signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread Sascha Silbe

On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:


Hi James/Sascha,

Did you test on XO-1 or XO-1.5?  I'm curious how much of a backwards-
compatibility break this is.
While the actual patch was only tested on XO-1, I tried out the 
ConsoleKit API on XO-1.5 first.
Both times Debian squeeze but since you only mentioned the name of the 
hardware I suppose this is exactly what you wanted to know. ;)


CU Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/

signature.asc
Description: Digital signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread Peter Robinson
On Wed, Apr 21, 2010 at 1:32 AM, James Cameron qu...@laptop.org wrote:
 On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:
 Hi James/Sascha,
     Reviewed-by: James Cameron qu...@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.

 Tested-by: James Cameron qu...@laptop.org

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

I thought the point of these patches was to move from HAL to
ConsoleKit so surely it should work whether HAL is there or not
especially with everyone moving away from HAL to
ConsoleKit/upower/udisk/udev etc/

Peter
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread Jonas Smedegaard

On Wed, Apr 21, 2010 at 10:12:43AM +0100, Peter Robinson wrote:

On Wed, Apr 21, 2010 at 1:32 AM, James Cameron qu...@laptop.org wrote:

On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:


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


I thought the point of these patches was to move from HAL to
ConsoleKit so surely it should work whether HAL is there or not
especially with everyone moving away from HAL to
ConsoleKit/upower/udisk/udev etc/


I do not know those mechanisms intimately, but can easily imagine that 
on some (versions of some) systems the transition has not completed yet 
so that *other* parts of the chain fail if HAL is unavailable.



Regards,

  - Jonas

--
* Jonas Smedegaard - idealist  Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: Digital signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread James Cameron
On Wed, Apr 21, 2010 at 10:12:43AM +0100, Peter Robinson wrote:
 I thought the point of these patches was to move from HAL to
 ConsoleKit so surely it should work whether HAL is there or not
 especially with everyone moving away from HAL to
 ConsoleKit/upower/udisk/udev etc/

The failure was unrelated to HAL being missing.  It was ConsoleKit
permissions.

I did try without HAL started, but keyboard and touchpad failed to work,
so I couldn't shutdown using the Sugar menu.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread James Cameron
On Wed, Apr 21, 2010 at 10:17:14AM +0200, Sascha Silbe wrote:
 Since I've run into the same issue before (i.e. with HAL), I suppose
 the default is the same but the OLPC builds explicitly configure HAL
 to allow shutdowns even for multiple sessions?

I've looked and not found where this might occur.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-21 Thread Daniel Drake
On 21 April 2010 19:07, James Cameron qu...@laptop.org wrote:
 On Wed, Apr 21, 2010 at 10:17:14AM +0200, Sascha Silbe wrote:
 Since I've run into the same issue before (i.e. with HAL), I suppose
 the default is the same but the OLPC builds explicitly configure HAL
 to allow shutdowns even for multiple sessions?

 I've looked and not found where this might occur.

See PolicyKit-olpc

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-20 Thread Chris Ball
Hi James/Sascha,

Reviewed-by: James Cameron qu...@laptop.org

Did you test on XO-1 or XO-1.5?  I'm curious how much of a backwards-
compatibility break this is.

- Chris.
-- 
Chris Ball   c...@laptop.org
One Laptop Per Child
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-20 Thread James Cameron
On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:
 Hi James/Sascha,
 Reviewed-by: James Cameron qu...@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.

Tested-by: James Cameron qu...@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@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-20 Thread Paul Fox
james wrote:
  On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:
   Hi James/Sascha,
   Reviewed-by: James Cameron qu...@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 qu...@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@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel

=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-20 Thread James Cameron
On Tue, Apr 20, 2010 at 08:37:54PM -0400, Paul Fox wrote:
 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?)

Lets Sugar hop the privilege barrier in a controlled fashion.  We could
work around that entirely by blessing /bin/reboot or /bin/shutdown with
setuid.  ;-}

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-20 Thread Paul Fox
james wrote:
  On Tue, Apr 20, 2010 at 08:37:54PM -0400, Paul Fox wrote:
   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?)
  
  Lets Sugar hop the privilege barrier in a controlled fashion.  We could
  work around that entirely by blessing /bin/reboot or /bin/shutdown with
  setuid.  ;-}

doh.  thank you.  that was very gentle.  :-)

paul
permissions?  what permissions?
=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-04-20 Thread James Cameron
On Wed, Apr 21, 2010 at 10:32:28AM +1000, James Cameron wrote:
 dbus.exceptions.DBusException: 
 org.freedesktop.ConsoleKit.Manager.NotPrivileged: Not privileged for action: 
 org.freedesktop.consolekit.system.restart-multiple-users 
 auth_admin_keep_always

After the patch is applied, Sugar's shutdown and restart options fail if
there are multiple logged in users; via SSH or text console.  It didn't
have anything to do with HAL being stopped, my mistake earlier.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel