Re: [Sugar-devel] Just learned about Mistery Meat Navigation

2012-03-26 Thread Carl Angiolillo
> However, that is different than the icons you use everyday.

True. The time spent learning iconography is amortized while the pixel
costs of the label remain fixed so those text labels that were very helpful
at first end up consuming unnecessary real-estate as the kids become
experts. However, if the kids become frustrated by confusing buttons* they
might not bother becoming experts at all so it's worth keeping an eye on
during testing.

> on a touch screen ... there's no obvious way to get the text descriptions
to pop up.

The method Android uses is to long press on a button to display its label.
I doubt this qualifies as "obvious" judging by the fact that this was
slipped quietly into 4.0 and I've never observed anyone using it. Some
interfaces (like native OS X toolbars or MS Office products) allow text
labels to be turned on and off by the user. I've used time-delay fade-in
labels on touchscreens (which were supposed to help novices while not
impacting expert use) but they turned out to be too distracting and not
helpful in the case of buttons that remain visible all the time. The
simplest method might be to bite the bullet, spend the pixels, and add text
labels to buttons on touchscreen devices.

Carl

*...e.g., a sound icon shaped like the profile of an internal electronic
component or a stop icon shaped like an octagon even in Libya, Zimbabwe,
the Bahamas, or Japan.

On Tue, Mar 20, 2012 at 19:37, Bert Freudenberg wrote:

>
> On 21.03.2012, at 00:16, C. Scott Ananian wrote:
>
> > On Tue, Mar 20, 2012 at 4:47 PM, Gonzalo Odiard 
> wrote:
> >> If you find non obvious icons, can report to try to improve.
> >> May be adults have problems with icons, but kids don't,
> >> just see a kid playing in any internet site.
> >
> > These icons become much more problematic on a touch screen, where
> there's no obvious way to get the text descriptions to pop up.
> >  --scott
>
> OTOH, on a web site, you just want to get results quickly, and then maybe
> never visit again. It's not worth learning what the icons mean, since they
> most likely are unique to that site. That's why using icons like in the
> video fails.
>
> However, that is different than the icons you use everyday. Those are
> worth learning. Of course, the learning must be made possible, and
> hopefully enjoyable. But the gut reaction of "I as an adult can't figure it
> out at first glance, so it must be bad" isn't quite appropriate.
>
> - Bert -
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Maze 4/4] Save and restore state of the game

2012-03-26 Thread Rafael Ortiz
On Mon, Mar 26, 2012 at 1:16 PM, Manuel Kaufmann  wrote:

> On Mon, Mar 26, 2012 at 14:59, Sascha Silbe 
> wrote:
> > First of all, thanks for the patch! Your help is very welcome.
> >
> > Disclaimer: I'm neither the maintainer of Maze nor a regular
> > contributor to it. My opinions and advice may differ from what you
> > need to do to get your patch accepted by the Maze maintainer.
>
> Wow! That review was awesome!
>
>
+1. kudos to Sasha for his insightful review, I agree with his points.



> I'll take a look at your review very carefully. I'm new on OLPC
> development and I'm trying to learn as much as possible. All my code
> was written taking a look at other Activities, I mean, I don't invent
> anything :P
>
> I took as example "Productive" Activity and some guides from the OLPC
> wiki. So, I will re-read them and try to discuss with you about your
> review with more data.
>
>
Many versions of the same patch can be discussed and
when a consensus is reach I can review, apply, and release.


> Thanks!
>
> --
> Kaufmann Manuel
> Blog: http://humitos.wordpress.com/
> Porfolio: http://fotos.mkaufmann.com.ar/
> PyAr: http://www.python.com.ar/
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Changing the prompt when inside a Sugar shell

2012-03-26 Thread Manuel Kaufmann
2012/3/26 Manuel Quiñones :
> Great to see interest.  Filed as #3399 .

I "solved" this ticket or something like that but I'm confused because
I had to modify a file under "jhbuild/" and "sjhbuild/" directory and
they are under different git repositories, so I created two patch
files (attached on this email)

I don't know how I should create the patch file(s). Can you help me?

The only way that I find to make this work is calling "bash" without
read "rc" (like ~/.bashrc) files. What do you think? Is this way
right?

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
From a0a60a810d897f9b9d2e06eb043a09eea72e5e01 Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann 
Date: Mon, 26 Mar 2012 23:23:57 -0300
Subject: [PATCH jhbuild 2/2] PS1 variable for "shell" command

Identifier "(sugar)$ " added to the PS1 variable, so we can know if we are in a
common or a sugar shell. This is to avoid confusion to the developers.

This patch solves issue #3399.

Signed-off-by: Manuel Kaufmann 
---
 sjhbuild/config.py |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/sjhbuild/config.py b/sjhbuild/config.py
index 95105ad..aaeab1b 100644
--- a/sjhbuild/config.py
+++ b/sjhbuild/config.py
@@ -88,3 +88,10 @@ class Config(jhbuild.config.Config):
 
 if not 'SUGAR_PROFILE' in os.environ:
 os.environ['SUGAR_PROFILE'] = 'default'
+
+prompt = '(sugar)'
+if 'PS1' in os.environ:
+prompt += os.environ['PS1']
+else:
+prompt += '$ '
+os.environ['PS1'] = prompt
-- 
1.7.9.1

From 1e728378dc89d1a5481e6e331debb51e3bf94be6 Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann 
Date: Mon, 26 Mar 2012 23:57:34 -0300
Subject: [PATCH jhbuild] Call $SHELL without read .bashrc files

This is useful to avoid specific user's configurations like the environment
variable PS1.

This commit solves ticket: #3399.

Signed-off-by: Manuel Kaufmann 
---
 jhbuild/commands/base.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/jhbuild/commands/base.py b/jhbuild/commands/base.py
index bf8e4b7..fc43ae1 100644
--- a/jhbuild/commands/base.py
+++ b/jhbuild/commands/base.py
@@ -454,7 +454,7 @@ class cmd_shell(Command):
 if "--help" in args:
 self.parse_args(args) # This doesn't return
 user_shell = os.environ.get('SHELL', '/bin/sh')
-os.execlp(user_shell, user_shell)
+os.execlp(user_shell, user_shell, '--norc')
 
 register_command(cmd_shell)
 
-- 
1.7.9.1

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


Re: [Sugar-devel] Changing the prompt when inside a Sugar shell

2012-03-26 Thread Manuel Quiñones
El día 26 de marzo de 2012 06:34, Sascha Silbe
 escribió:
> Excerpts from Manuel Quiñones's message of 2012-03-25 20:47:14 +0200:
>
>> what about changing the prompt when doing:
>>
>> ./sugar-jhbuild shell
>>
>> Is a bit confusing for me to know which tabs in my GNOME Terminal are
>> inside Sugar shells.  I often end calling env and checking for the
>> current environment variables.
>
> Good idea. Can you file a ticket upstream [1], please?

Great to see interest.  Filed as #3399 .

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


Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Gonzalo Odiard
You have Gtk < 2.20 ?
Probably will have more problems...

Gonzalo

On Mon, Mar 26, 2012 at 9:54 PM, Manuel Kaufmann  wrote:

> On Mon, Mar 26, 2012 at 21:04, Manuel Kaufmann  wrote:
> > python: symbol lookup error:
> > /srv/sugar-jhbuild/install/lib/gtk-2.0/2.10.0/engines/libsugar.so:
> > undefined symbol: GTK_WIDGET_HAS_FOCUS
>
> So, I think this is the error. I'm researching about this.
>
> ... some time later ...
>
> Yes! I found the problem!
>
> Here it is:
>
>  * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583578
>
> It's already reported here: https://bugs.sugarlabs.org/ticket/1899 and
> solved here
> http://git.sugarlabs.org/sugar-artwork/mainline/commit/5d88c8943e14a0ca31af1dea86e743f869383567
> but reverted
> http://git.sugarlabs.org/sugar-artwork/mainline/commit/ac029997d30ed0e76b319d0ccadb058e21f4d054
>
> I had to apply this patch
> https://bugs.sugarlabs.org/attachment/ticket/1899/sugar-1899.patch to
> get "run sugar-emulator" working...
>
> In that ticket is the discussion about why the revert of that commit...
>
> Now, I have sugar-emulator working, but I have patched it and that is
> not funny :P
>
> --
> Kaufmann Manuel
> Blog: http://humitos.wordpress.com/
> Porfolio: http://fotos.mkaufmann.com.ar/
> PyAr: http://www.python.com.ar/
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 21:04, Manuel Kaufmann  wrote:
> python: symbol lookup error:
> /srv/sugar-jhbuild/install/lib/gtk-2.0/2.10.0/engines/libsugar.so:
> undefined symbol: GTK_WIDGET_HAS_FOCUS

So, I think this is the error. I'm researching about this.

... some time later ...

Yes! I found the problem!

Here it is:

 * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583578

It's already reported here: https://bugs.sugarlabs.org/ticket/1899 and
solved here 
http://git.sugarlabs.org/sugar-artwork/mainline/commit/5d88c8943e14a0ca31af1dea86e743f869383567
but reverted 
http://git.sugarlabs.org/sugar-artwork/mainline/commit/ac029997d30ed0e76b319d0ccadb058e21f4d054

I had to apply this patch
https://bugs.sugarlabs.org/attachment/ticket/1899/sugar-1899.patch to
get "run sugar-emulator" working...

In that ticket is the discussion about why the revert of that commit...

Now, I have sugar-emulator working, but I have patched it and that is
not funny :P

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Gonzalo Odiard
>
>
> There is something wrong with "espeak"; maybe something weird with
> pulseaudio or alsa. I had a similar problem with another application
> some time ago. I'll check this.
>
>
Probably you don't have gstreamer-plugins-espeak installed,
(or how is called in debian), but that does not break your sugar session.

Gonzalo



> --
> Kaufmann Manuel
> Blog: http://humitos.wordpress.com/
> Porfolio: http://fotos.mkaufmann.com.ar/
> PyAr: http://www.python.com.ar/
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 20:35, Manuel Kaufmann  wrote:
> Do you see something strange?

Well, taking a look at the Makefile and trying to run all the commands
one by one, I found that my problem was / is the GREP_OPTIONS env var.

I had to "unset GREP_OPTIONS" before running this command and
everything went right. I think that is not a good option to have set.
This is not the first time that I have problems because of this!

So, my recommendation for the grep's developers is to remove this option :D

Some time later..

After re-compiling and installing this package again, I get this error
when I run "sugar-emulator":

[humitos] [/srv/sugar-jhbuild]$ cat ~/.sugar/default/logs/shell.log
:30
** (sugar-session:21841): DEBUG: starting phase 1

** (sugar-session:21841): DEBUG: ending phase 1

** (sugar-session:21841): DEBUG: starting phase 2

** (sugar-session:21841): DEBUG: ending phase 2

** (sugar-session:21841): DEBUG: starting phase 3

** (sugar-session:21841): DEBUG: ending phase 3

** (sugar-session:21841): DEBUG: starting phase 4

** (sugar-session:21841): DEBUG: ending phase 4

** (sugar-session:21841): DEBUG: starting phase 5

** (sugar-session:21841): DEBUG: ending phase 5

1332805956.464469 DEBUG root: STARTUP: Loading the desktop window
1332805956.467270 DEBUG root: STARTUP: Loading the home view
1332805956.467688 DEBUG root: STARTUP: Loading the favorites view
1332805956.501929 DEBUG root: FavoritesSetting layout 'ring-layout'
1332805956.502219 DEBUG root: Icon without fixed_position: 
1332805956.502289 DEBUG root: Icon without fixed_position:

1332805956.502366 DEBUG root: STARTUP: Loading the activities list
1332805956.593992 WARNING root: No gtk.AccelGroup in the top level window.
1332805956.596500 WARNING root: No gtk.AccelGroup in the top level window.
1332805956.596868 DEBUG root: STARTUP: Loading the group view
1332805956.610659 DEBUG root: STARTUP: Loading the mesh view
1332805956.791149 DEBUG root: NetworkManager not available
1332805956.799760 DEBUG root: Not an activity icon 
1332805956.799964 DEBUG root: Not an activity icon

1332805956.870564 DEBUG root: Already have a Salut account
1332805956.873975 DEBUG root: _Account.enable
/org/freedesktop/Telepathy/Account/salut/local_xmpp/account0
1332805956.875505 DEBUG root: Already have a Gabble account
1332805956.878500 DEBUG root: _Account.enable
/org/freedesktop/Telepathy/Account/gabble/jabber/_39768901951664f881b9434c7587805381ae6d322_40jabber_2esugarlabs_2eorg0
1332805956.891479 DEBUG root: _Account.__got_connection_cb
dbus.ObjectPath('/', variant_level=1)
1332805956.892488 DEBUG root: _Account.__set_enabled_cb success
1332805956.892868 DEBUG root: _Account.__got_connection_cb
dbus.ObjectPath('/org/freedesktop/Telepathy/Connection/gabble/jabber/_39768901951664f881b9434c7587805381ae6d322_40jabber_2esugarlabs_2eorg_2fsugar',
variant_level=1)
1332805956.895564 DEBUG root: _Account.__set_enabled_cb success
1332805956.904223 DEBUG root: _Account.__got_connection_error_cb
dbus.String(u'', variant_level=1)
1332805956.917731 DEBUG root: STARTUP: unfreeze_dcon_cb
1332805956.919606 ERROR dbus.proxies: Introspect error on
org.freedesktop.ohm:/org/freedesktop/ohm/Keystore:
dbus.exceptions.DBusException:
org.freedesktop.DBus.Error.ServiceUnknown: The name
org.freedesktop.ohm was not provided by any .service files
1332805956.919911 DEBUG dbus.proxies: Executing introspect queue due to error
1332805956.921552 ERROR root: Cannot unfreeze the DCON
1332805956.946958 DEBUG root: STARTUP: window_manager
:30
1332805957.044177 DEBUG root: STARTUP: Loading the bundle registry
1332805957.045608 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/Productive.activity'
1332805957.047546 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/StopWatch.activity'
1332805957.048936 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/Colors!.activity'
1332805957.050224 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/FiftyTwo.activity'
1332805957.051504 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/StoryBuilder.activity'
1332805957.052795 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/Moon.activity'
1332805957.054058 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/Paint.activity'
1332805957.055428 DEBUG root: STARTUP: Adding bundle
'/home/humitos/Activities/Maze.activity'
1332805957.058184 DEBUG root: STARTUP: Adding bundle
'/srv/sugar-jhbuild/install/share/sugar/activities/ImageViewer.activity'
1332805957.059297 DEBUG root: STARTUP: Adding bundle
'/srv/sugar-jhbuild/install/share/sugar/activities/Write.activity'
1332805957.077267 DEBUG root: STARTUP: Adding bundle
'/srv/sugar-jhbuild/install/share/sugar/activities/Pippy.activity'
1332805957.078967 DEBUG root: STARTUP: Adding bundle
'/srv/sugar-jhbuild/install/share/sugar/activities/Calculate.activity'
1332805957.084735 DEBUG root: STARTUP: Adding bundle
'/srv/sugar-jhbuild/install/share/sugar/activities/Chat.activity'
1332805957.092691 D

Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 20:18, Manuel Kaufmann  wrote:
> I thought that, so I re-compiled the package as you told me some days
> ago. But the problem is still there.

Sorry, I was confused. In fact, I tried to re-compile this package but
I got this error:


Take a look at this part:

make[3]: Entering directory `/tmp/pfff/gconf-3.2.3/po'
Makefile:120: *** target pattern contains no `%'.  Stop.



$ cat -n /tmp/pfff/gconf-3.2.3/po/Makefile

[]

   113  .po.cat:
   114  sed -f ../intl/po2msg.sed < $< > $*.msg \
   115&& rm -f $@ && gencat $@ $*.msg
   116  
   117  
   118  all: all-yes
   119  
   120  all-yes: $(CATALOGS)
   121  all-no:
   122  
   123  $(GETTEXT_PACKAGE).pot: $(POTFILES)
   124  $(GENPOT)
   125  
   126  install: install-data
   127  install-data: install-data-yes
   128  install-data-no: all
   129  install-data-yes: all
   130  linguas="$(USE_LINGUAS)"; \
   131  for lang in $$linguas; do \

[]

Do you see something strange?

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 19:12, Sascha Silbe  wrote:
> Looks like you ran into Debian#648724 [1] again. Do you still have the
> local packages with the fix or should I publish mine (amd64, armel,
> i386)?

I thought that, so I re-compiled the package as you told me some days
ago. But the problem is still there.

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Sascha Silbe
Excerpts from Manuel Kaufmann's message of 2012-03-26 21:16:37 +0200:

>   File 
> "/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homebox.py",
> line 294, in _update_icon
> self.props.named_icon = favoritesview.LAYOUT_MAP[self._layout]\
> KeyError: None
> 1332789278.997674 DEBUG root: _cleanup_temp_files
> [humitos] [/srv/sugar-jhbuild]$
> 
>  ~/.sugar/default/logs/shell.log 
> 
> 
> I don't know what to do. I want to revise my Maze's patch but I can't
> because I'm not able to run sugar-emulator.
> 
> By the way, I'm running Debian Testing.

Looks like you ran into Debian#648724 [1] again. Do you still have the
local packages with the fix or should I publish mine (amd64, armel,
i386)?

Sascha

[1] http://bugs.debian.org/648724
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


[Sugar-devel] [ASLO] Release Record-95

2012-03-26 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4081

Sugar Platform:
0.96 - 0.96

Download Now:
http://activities.sugarlabs.org/downloads/file/27939/record-95.xo

Release notes:



Sugar Labs Activities
http://activities.sugarlabs.org

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


Re: [Sugar-devel] Gonzalo added as moderator in Trac (was: Re: Moderation on bugs.sl.o)

2012-03-26 Thread Chris Leonard
On Mon, Mar 26, 2012 at 3:05 PM, Sascha Silbe  wrote:

> Your new permissions allow you to do more than just the above (probably
> including elevating your own privileges); the general policy of the SL
> infrastructure team is to trust people not to abuse their power rather
> than impeding their work.

I'm not sure I would phrase our unwritten policy in quite that way.
We don't just blindly trust anyone, we do however place great trust in
those who have earned it by their demonstrated commitment to being
good citizens of our community or the larger FOSS community to which
we belong.  Gonzalo has certainly earned that trust.

I personally see it as being somewhat "reputation capital" based, with
reputation earned in other projects (e.g. Fedora, etc.) also being an
acceptable currency.  People who have invested in building reputation
capital will not squander it foolishly.

I have every confidence Gonzalo will "do the right thing".

Just a thought.

cjl
Sugar Labs Translation Team Coordinator
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Gonzalo added as moderator in Trac (was: Re: Moderation on bugs.sl.o)

2012-03-26 Thread Gonzalo Odiard
Thanks.
I will look at the moderate queue.

Gonzalo

On Mon, Mar 26, 2012 at 4:05 PM, Sascha Silbe  wrote:

> Excerpts from Gonzalo Odiard's message of 2012-03-20 21:44:17 +0100:
>
> > If you want, add me to the list.
> > I think is important try to responsive with our possible volunteers.
>
> Done. You should now see additional menu items "Moderator" and "Admin"
> in Trac. "Moderator" (suffixed with the number of pending requests if
> there are any) shows the moderation queue. You can inspect individual
> requests and approve / reject them individually or in bulk.
>
> "Admin" -> General / Permissions should allow you to add users to the
> group "unmoderated" (for real users) resp. "spammer". I'm doing the same
> using shell scripts as I have CLI access to Trac. If the volume went
> high enough for this to be a significant nuisance, we could try hacking
> the TicketModerator plugin to adjust the permissions automatically, but
> so far it hasn't been worth the effort.
>
> Your new permissions allow you to do more than just the above (probably
> including elevating your own privileges); the general policy of the SL
> infrastructure team is to trust people not to abuse their power rather
> than impeding their work.
>
> Thanks for volunteering!
>
> Sascha
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Error on "run sugar-emulator"

2012-03-26 Thread Manuel Kaufmann
Hello,

I'm trying to run sugar-emulator but I'm getting an error. The problem
appeared today's morning after running:

[humitos] [/srv/sugar-jhbuild]$ ./sugar-jhbuild update
[...]
[humitos] [/srv/sugar-jhbuild]$ ./sugar-jhbuild build
[...]

Every finished properly, but when I run "./sugar-jhbuild run
sugar-emulator" I get this error:

[humitos] [/srv/sugar-jhbuild]$ ./sugar-jhbuild run sugar-emulator
Warning: unknown distro version, automatic fallback to unstable.

** (process:27937): WARNING **: Trying to register gtype
'GMountMountFlags' as flags when in fact it is of type 'GEnum'

** (process:27937): WARNING **: Trying to register gtype
'GDriveStartFlags' as flags when in fact it is of type 'GEnum'

** (process:27937): WARNING **: Trying to register gtype
'GSocketMsgFlags' as flags when in fact it is of type 'GEnum'
GNOME_KEYRING_CONTROL=/tmp/keyring-DjwJkF
GNOME_KEYRING_PID=27997
1332789276.537258 STARTUP: Starting the shell

** (process:27970): WARNING **: Trying to register gtype
'GMountMountFlags' as flags when in fact it is of type 'GEnum'

** (process:27970): WARNING **: Trying to register gtype
'GDriveStartFlags' as flags when in fact it is of type 'GEnum'

** (process:27970): WARNING **: Trying to register gtype
'GSocketMsgFlags' as flags when in fact it is of type 'GEnum'
Window manager warning: Fatal IO error 11 (Resource temporarily
unavailable) on display ':30'.
[humitos] [/srv/sugar-jhbuild]$

 ~/.sugar/default/logs/shell.log 

[humitos] [/srv/sugar-jhbuild]$ cat ~/.sugar/default/logs/shell.log
:30
** (sugar-session:27970): DEBUG: starting phase 1

** (sugar-session:27970): DEBUG: ending phase 1

** (sugar-session:27970): DEBUG: starting phase 2

** (sugar-session:27970): DEBUG: ending phase 2

** (sugar-session:27970): DEBUG: starting phase 3

** (sugar-session:27970): DEBUG: ending phase 3

** (sugar-session:27970): DEBUG: starting phase 4

** (sugar-session:27970): DEBUG: ending phase 4

** (sugar-session:27970): DEBUG: starting phase 5

** (sugar-session:27970): DEBUG: ending phase 5

1332789278.760215 DEBUG root: STARTUP: Loading the desktop window
/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homewindow.py:44:
GtkWarning: Default font does not have a positive size
  gtk.Window.__init__(self)
/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homewindow.py:58:
GtkWarning: Default font does not have a positive size
  self.realize()
1332789278.772365 DEBUG root: STARTUP: Loading the home view
1332789278.772798 DEBUG root: STARTUP: Loading the favorites view
1332789278.834200 DEBUG root: FavoritesSetting layout None
1332789278.834797 WARNING root: Unknown favorites layout: None
1332789278.835185 DEBUG root: Icon without fixed_position: 
1332789278.835408 DEBUG root: Icon without fixed_position:

1332789278.835657 DEBUG root: STARTUP: Loading the activities list
/srv/sugar-jhbuild/install/lib/python2.7/site-packages/sugar/graphics/palette.py:129:
GtkWarning: Default font does not have a positive size
  self.add(palette_box)
1332789278.886971 WARNING root: No gtk.AccelGroup in the top level window.
Traceback (most recent call last):
  File "/srv/sugar-jhbuild/install/bin/sugar-session", line 289, in 
main()
  File "/srv/sugar-jhbuild/install/bin/sugar-session", line 265, in main
home_window = homewindow.get_instance()
  File 
"/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homewindow.py",
line 208, in get_instance
_instance = HomeWindow()
  File 
"/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homewindow.py",
line 68, in __init__
self._home_box = HomeBox()
  File 
"/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homebox.py",
line 51, in __init__
self._toolbar = HomeToolbar()
  File 
"/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homebox.py",
line 189, in __init__
favorites_button = FavoritesButton()
  File 
"/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homebox.py",
line 259, in __init__
self._update_icon()
  File 
"/srv/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/desktop/homebox.py",
line 294, in _update_icon
self.props.named_icon = favoritesview.LAYOUT_MAP[self._layout]\
KeyError: None
1332789278.997674 DEBUG root: _cleanup_temp_files
[humitos] [/srv/sugar-jhbuild]$

 ~/.sugar/default/logs/shell.log 


I don't know what to do. I want to revise my Maze's patch but I can't
because I'm not able to run sugar-emulator.

By the way, I'm running Debian Testing.

Thanks!

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Gonzalo added as moderator in Trac (was: Re: Moderation on bugs.sl.o)

2012-03-26 Thread Sascha Silbe
Excerpts from Gonzalo Odiard's message of 2012-03-20 21:44:17 +0100:

> If you want, add me to the list.
> I think is important try to responsive with our possible volunteers.

Done. You should now see additional menu items "Moderator" and "Admin"
in Trac. "Moderator" (suffixed with the number of pending requests if
there are any) shows the moderation queue. You can inspect individual
requests and approve / reject them individually or in bulk.

"Admin" -> General / Permissions should allow you to add users to the
group "unmoderated" (for real users) resp. "spammer". I'm doing the same
using shell scripts as I have CLI access to Trac. If the volume went
high enough for this to be a significant nuisance, we could try hacking
the TicketModerator plugin to adjust the permissions automatically, but
so far it hasn't been worth the effort.

Your new permissions allow you to do more than just the above (probably
including elevating your own privileges); the general policy of the SL
infrastructure team is to trust people not to abuse their power rather
than impeding their work.

Thanks for volunteering!

Sascha

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


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


[Sugar-devel] [RELEASE] sugar-0.95.6

2012-03-26 Thread Simon Schampijer
== Source ==

http://download.sugarlabs.org/sources/sucrose/glucose/sugar/sugar-0.95.6.tar.bz2

== News ==

* Release 0.95.6 (Simon Schampijer)
* Update ALL_LINGUAS (Simon Schampijer)
* Recreate corrupted key pair (fixes SL#1568) (Sascha Silbe)
* Remove ay and qu from ALL_LINGUAS as those keeps from building (Simon 
Schampijer)
* Commit from Sugar Labs: Translation System by user dram.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user HoboPrimate.: 389 of 389 
messages translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user HoboPrimate.: 389 of 389 
messages translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 128 of 389 messages 
translated (6 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 211 of 389 messages 
translated (5 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 66 of 389 messages 
translated (109 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 121 of 389 messages 
translated (5 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 169 of 389 messages 
translated (12 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 225 of 389 messages 
translated (9 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 272 of 389 messages 
translated (5 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 271 of 389 messages 
translated (5 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 183 of 389 messages 
translated (4 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 199 of 389 messages 
translated (26 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 277 of 389 messages 
translated (7 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 207 of 389 messages 
translated (18 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 212 of 389 messages 
translated (12 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 198 of 389 messages 
translated (5 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 256 of 389 messages 
translated (23 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 267 of 389 messages 
translated (7 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 269 of 389 messages 
translated (6 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 305 of 389 messages 
translated (31 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 347 of 389 messages 
translated (6 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 298 of 389 messages 
translated (7 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 342 of 389 messages 
translated (3 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 353 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 355 of 389 messages 
translated (18 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 366 of 389 messages 
translated (6 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 362 of 389 messages 
translated (1 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 362 of 389 messages 
translated (1 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 382 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 377 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 388 of 389 messages 
translated (1 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation System by user cjl.: 389 of 389 messages 
translated (0 fuzzy). (Pootle daemon)
* Commit from Sugar Labs: Translation Syst

[Sugar-devel] [PATCH Clock] Set clock center relative to ClockFace widget, not activity window

2012-03-26 Thread Manuel Quiñones
This fixes bug #3394 .

Signed-off-by: Manuel Quiñones 
---
 clock.py |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clock.py b/clock.py
index 1893b77..825fb93 100755
--- a/clock.py
+++ b/clock.py
@@ -530,8 +530,8 @@ class ClockFace(gtk.DrawingArea):
 of the clock, radius).
 """
 # Store the measures of the clock face widget
-self._center_x = int(allocation.x + allocation.width / 2.0)
-self._center_y = int(allocation.y + allocation.height / 2.0)
+self._center_x = int(allocation.width / 2.0)
+self._center_y = int(allocation.height / 2.0)
 self._radius = max(min(int(allocation.width / 2.0), \
 int(allocation.height / 2.0)) - 20, 0)
 self._width = allocation.width
-- 
1.7.7.6

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


Re: [Sugar-devel] [PATCH] Recreate corrupted key pair (#1568)

2012-03-26 Thread Simon Schampijer

Thanks, pushed that one.

On 03/23/2012 09:17 PM, Daniel Drake wrote:

From: Sascha Silbe

Recreate a corrupted key pair instead of leaving it alone and failing horribly
later.

This case was recently encountered in Nicaragua.

Signed-off-by: Sascha Silbe
Signed-off-by: Daniel Drake
---
  src/jarabe/intro/window.py |   27 ---
  1 files changed, 20 insertions(+), 7 deletions(-)

I think this part of #1568 was forgotten earlier.
I fixed the spacing around '+', rediffed, and tested that it solves a
case found in Nicaragua where the key files were 0 bytes. This was
causing Sugar to ask for the user's name on every reboot, and causing
Record to fail to launch.

diff --git a/src/jarabe/intro/window.py b/src/jarabe/intro/window.py
index f7937b1..86ebbe8 100644
--- a/src/jarabe/intro/window.py
+++ b/src/jarabe/intro/window.py
@@ -15,6 +15,7 @@
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

  import os
+import os.path
  import logging
  from gettext import gettext as _
  import gconf
@@ -24,6 +25,7 @@ import gtk
  import gobject

  from sugar import env
+from sugar import profile
  from sugar.graphics import style
  from sugar.graphics.icon import Icon
  from sugar.graphics.xocolor import XoColor
@@ -43,16 +45,27 @@ def create_profile(name, color=None):
  client.set_string('/desktop/sugar/user/color', color.to_string())
  client.suggest_sync()

+if profile.get_pubkey() and profile.get_profile().privkey_hash:
+logging.warning('Valid key pair found, skipping generation.')
+return
+
  # Generate keypair
  import commands
  keypath = os.path.join(env.get_profile_path(), 'owner.key')
-if not os.path.isfile(keypath):
-cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
-(s, o) = commands.getstatusoutput(cmd)
-if s != 0:
-logging.error('Could not generate key pair: %d %s', s, o)
-else:
-logging.error('Keypair exists, skip generation.')
+if os.path.exists(keypath):
+os.rename(keypath, keypath + '.broken')
+logging.warning('Existing private key %s moved to %s.broken',
+keypath, keypath)
+
+if os.path.exists(keypath + '.pub'):
+os.rename(keypath + '.pub', keypath + '.pub.broken')
+logging.warning('Existing public key %s.pub moved to %s.pub.broken',
+keypath, keypath)
+
+cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
+(s, o) = commands.getstatusoutput(cmd)
+if s != 0:
+logging.error('Could not generate key pair: %d %s', s, o)


  class _Page(gtk.VBox):


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


Re: [Sugar-devel] [PATCH Maze 4/4] Save and restore state of the game

2012-03-26 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 14:59, Sascha Silbe  wrote:
> First of all, thanks for the patch! Your help is very welcome.
>
> Disclaimer: I'm neither the maintainer of Maze nor a regular
> contributor to it. My opinions and advice may differ from what you
> need to do to get your patch accepted by the Maze maintainer.

Wow! That review was awesome!

I'll take a look at your review very carefully. I'm new on OLPC
development and I'm trying to learn as much as possible. All my code
was written taking a look at other Activities, I mean, I don't invent
anything :P

I took as example "Productive" Activity and some guides from the OLPC
wiki. So, I will re-read them and try to discuss with you about your
review with more data.

Thanks!

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Patch: Mobile dongles

2012-03-26 Thread Jerry Vonau
On Mon, 2012-03-26 at 13:27 -0400, Paul Fox wrote:
> jerry wrote:
>  > On Mon, 2012-03-26 at 11:54 -0400, Paul Fox wrote:
>  > > jerry wrote:
>  > >  > On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote:
>  > >  > > David
>  > >  > > 
>  > >  > > This message was sent with a gsm dongle on an xo-1
>  > >  > >  
>  > >  > >  modem:Huawei E160E
>  > >  > >  carrier:Locked to Dodo (an Optus reseller)
>  > >  > >  XO-1
>  > >  > >  OS31 development which is same as os884 signed
>  > >  > >  
>  > >  > >  in my settings, enter username, password, leave *99# unaltered, 
> dodolns1, blank, blank
>  > >  > >  
>  > >  > >  turn off power management, because XO looses connection in sleep 
> mode
>  > >  > 
>  > >  > I have an enhancements to powerd to inhibit suspend for that issue. 
> The
>  > >  > attached proof of concept patch is heavy on tracing, should apply, 
> maybe
>  > >  > with an offset, and needs /etc/powerd/flags/modules-inhibits created
>  > >  > containing usb_wwan. Once usb_wwan is inserted in the kernel, it 
> remains
>  > >  > in memory you can have NM dispatcher or pppd remove the module when 
> the
>  > >  > connection is torn down to restore normal power management operation.
>  > >  > These features are in testable with au210. Sorry 4g images only, with 
> no
>  > >  > firmware in the image. http://build.laptop.org.au/xo/os/latest/
>  > > 
>  > > is presence of the module really the best way to do this?  is it
>  > > possible to look for the presence of the network interface, or maybe
>  > > simply network traffic, or something similar?  
>  > 
>  > In the field test reports are saying the modem is getting reset upon
>  > suspend while the trying to connect. Think the 15 second, 5 second if
>  > your in suspend and don't have any other user activity, sleep loop may
>  > not allow enough time to have the modem complete the pppd handshake and
>  > bring up the interface. 
> 
> who manages the connection?  network manager?  

NetworkManager/modem-manager

> does it announce the connection sequence via dbus?  

They should but I'm unsure or what signals are. 

> powerd-dbus is already listening for
> connection status to prevent sleep during wifi association -- perhaps
> that mechanism can be leveraged.
> 

That would be the best way.

>  > 
>  > > i assume using the
>  > > existing usb-inhibits is impractical because of the variety of
>  > > devices, is that right?
>  > >   
>  > Yes, that is the reason. We want a one-size-fits-all fix where the user
>  > doesn't have to populate any files. 
>  > 
>  > > i guess it would be too much to ask for all
>  > > GSM devices to be in the same USB class.  :-/
>  > > 
>  > What would be the appropriate USB class? Mine comes up as usb-storage at
>  > first and usb_modeswitch has to act on it adding time to the connection
>  > routine. 
>  > 
>  > > (maybe the module presence check is okay -- it just doesn't feel right.)
>  > > 
>  > I think this could be used for other devices also like wedo or usb2vga
>  > maybe.
> 
> perhaps.
> 
> wedo is readily identifiable by vendor, i think -- and why would one
> want it to inhibit suspend?  that seems more like it should be under
> the activity's control.
> 

Think there needs to be a consensus on what should be in powerd and
which activities need to prevent suspend.

> i'd think (but don't know) that usb2vga would be used seldom enough
> that you could either inhibit suspend manually, or change the config
> so it doesn't suspend when plugged in -- i can't imagine using usb2vga
> when you don't have plenty of power available.

Sure untick the box in the applet is a good workaround, like for a usb
modem. ;)

Jerry





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


Re: [Sugar-devel] [PATCH Maze 4/4] Save and restore state of the game

2012-03-26 Thread Sascha Silbe
Excerpts from Manuel Kaufmann's message of 2012-03-21 02:52:54 +0100:


First of all, thanks for the patch! Your help is very welcome.

Disclaimer: I'm neither the maintainer of Maze nor a regular
contributor to it. My opinions and advice may differ from what you
need to do to get your patch accepted by the Maze maintainer.


[patch description]
> The data is saved (as JSON, with simplejson module) in the 'event.filename'
> path using the 'sugar.datastore' API.
>
> A filename example is:
> 
>  ~/.sugar/default/datastore/09/0940b7eb-1cb7-4687-aa7a-ac2c174dcfd7/data

The file name is an implementation detail of the current version of
sugar-datastore and shouldn't usually be mentioned in the commit
message of an unrelated component.


[game.py]
> @@ -23,13 +23,23 @@
>  
>  import sys
>  import time
> -
> +import simplejson
[...]

At least in Glucose [1], we're trying to get rid of simplejson. If you
want Maze to continue to run on systems that don't have Python 2.6
yet, you can do the following to use the standard json module on
"modern" systems and fall back to simplejson on older ones:

try:
import json
except ImportError:
import simplejson as json


> +import tempfile
> +import shutil
>  import pygame
> +import olpcgames
> +
> +import logging
> +log = logging.getLogger('Maze')
> +log.setLevel(logging.DEBUG)
> +logging.basicConfig()

sugar-activity will already initialise the logging subsystem for you,
so no need for the setLevel() and basicConfig() calls.

To set the log level, you can set the environment variable
SUGAR_LOGGER_LEVEL. There are generally three ways to do that:

1. In ~/.sugar/debug (contains commented-out examples).

   Easiest to do, affects all new Sugar sessions, works even if Sugar
   is started directly by the display manager.

2. Setting it in your shell before starting Sugar.

   Only affects the about-to-be-started Sugar session, which may be
   exactly what you want (in some cases).

3. Setting it in the Terminal (activity) shell before starting an
   activity session manually using sugar-activity.

   Only affects the about-to-be-started activity session, not Glucose
   or other activities.


[...]
[MazeGame.__init__()]
> -# start with a small maze using a seed that will be different
> -# each time you play
> -self.maze = Maze(int(time.time()), int(9 * self.aspectRatio), 9)
> -self.reset()
> +# no data is known yet (maybe the user is resuming a state or
> +# launching a new instance)
> +self.data = None
> +

See below for comments regarding this change.


> @@ -283,8 +293,42 @@ class MazeGame:
>  (event, sys.exc_info())
>  else:
>  print "Message from unknown buddy?"
> +
> +elif event.type == pygame.USEREVENT:
> +# process fil save / restore events

typo: file


> +if event.code == olpcgames.FILE_READ_REQUEST:
> +log.debug(event)

The first argument to the log. family of functions is a format
string. If you wish to log the value of some variable, you should use
%s or %r in the format string and pass the variable as second+ parameter:

log.debug('event=%r', event)

Depending on what exactly you're logging, this mistake may even be
exploitable [2,3], similar to printf() exploits with C.


> +log.debug('Loading the state of the game...')
> +self.data = simplejson.loads(open(event.filename, 
> 'r').read())
> +log.debug('Loaded data: %s' % self.data)
> +return True

Why do you store the intermediate data, rather than passing it to a
Maze instance (that has previously been instantiated with default
values) or creating a new instance right away?


> +elif event.code == olpcgames.FILE_WRITE_REQUEST:
> +log.debug(event)
> +log.debug('Saving the state of the game...')
> +data = {'seed': self.maze.seed,
> +'width': self.maze.width,
> +'height': self.maze.height,
> +}
> +log.debug('Saving data: %s' % data)

As explained above, log. can do the formatting for you:

log.debug('Saving data: %s', data)

The advantage of this is that the formatting is only do if this line
actually gets logged, providing a minor performance benefit on systems
that don't have debug logging enabled.


> +file_dsobject = datastore.create()
> +file_dsobject.metadata = event.metadata

You're creating a new Journal entry every time, rather than updating
an existing entry. This will result in Journal spam as activities are
expected to save their state whenever you switch away from them. It
also won't match the behaviour outlined in the Human Interface
Guidelines (HIG [4]) and implemented by other Sugar activities.

sugar.activity.activity.Activity already implements all of the logic
you need and AFA

Re: [Sugar-devel] Patch: Mobile dongles

2012-03-26 Thread Paul Fox
jerry wrote:
 > On Mon, 2012-03-26 at 11:54 -0400, Paul Fox wrote:
 > > jerry wrote:
 > >  > On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote:
 > >  > > David
 > >  > > 
 > >  > > This message was sent with a gsm dongle on an xo-1
 > >  > >  
 > >  > >  modem:Huawei E160E
 > >  > >  carrier:Locked to Dodo (an Optus reseller)
 > >  > >  XO-1
 > >  > >  OS31 development which is same as os884 signed
 > >  > >  
 > >  > >  in my settings, enter username, password, leave *99# unaltered, 
 > > dodolns1, blank, blank
 > >  > >  
 > >  > >  turn off power management, because XO looses connection in sleep mode
 > >  > 
 > >  > I have an enhancements to powerd to inhibit suspend for that issue. The
 > >  > attached proof of concept patch is heavy on tracing, should apply, maybe
 > >  > with an offset, and needs /etc/powerd/flags/modules-inhibits created
 > >  > containing usb_wwan. Once usb_wwan is inserted in the kernel, it remains
 > >  > in memory you can have NM dispatcher or pppd remove the module when the
 > >  > connection is torn down to restore normal power management operation.
 > >  > These features are in testable with au210. Sorry 4g images only, with no
 > >  > firmware in the image. http://build.laptop.org.au/xo/os/latest/
 > > 
 > > is presence of the module really the best way to do this?  is it
 > > possible to look for the presence of the network interface, or maybe
 > > simply network traffic, or something similar?  
 > 
 > In the field test reports are saying the modem is getting reset upon
 > suspend while the trying to connect. Think the 15 second, 5 second if
 > your in suspend and don't have any other user activity, sleep loop may
 > not allow enough time to have the modem complete the pppd handshake and
 > bring up the interface. 

who manages the connection?  network manager?  does it announce the
connection sequence via dbus?  powerd-dbus is already listening for
connection status to prevent sleep during wifi association -- perhaps
that mechanism can be leveraged.

 > 
 > > i assume using the
 > > existing usb-inhibits is impractical because of the variety of
 > > devices, is that right?
 > >   
 > Yes, that is the reason. We want a one-size-fits-all fix where the user
 > doesn't have to populate any files. 
 > 
 > > i guess it would be too much to ask for all
 > > GSM devices to be in the same USB class.  :-/
 > > 
 > What would be the appropriate USB class? Mine comes up as usb-storage at
 > first and usb_modeswitch has to act on it adding time to the connection
 > routine. 
 > 
 > > (maybe the module presence check is okay -- it just doesn't feel right.)
 > > 
 > I think this could be used for other devices also like wedo or usb2vga
 > maybe.

perhaps.

wedo is readily identifiable by vendor, i think -- and why would one
want it to inhibit suspend?  that seems more like it should be under
the activity's control.

i'd think (but don't know) that usb2vga would be used seldom enough
that you could either inhibit suspend manually, or change the config
so it doesn't suspend when plugged in -- i can't imagine using usb2vga
when you don't have plenty of power available.

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: Mobile dongles

2012-03-26 Thread Jerry Vonau
On Mon, 2012-03-26 at 11:54 -0400, Paul Fox wrote:
> jerry wrote:
>  > On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote:
>  > > David
>  > > 
>  > > This message was sent with a gsm dongle on an xo-1
>  > >  
>  > >  modem:Huawei E160E
>  > >  carrier:Locked to Dodo (an Optus reseller)
>  > >  XO-1
>  > >  OS31 development which is same as os884 signed
>  > >  
>  > >  in my settings, enter username, password, leave *99# unaltered, 
> dodolns1, blank, blank
>  > >  
>  > >  turn off power management, because XO looses connection in sleep mode
>  > 
>  > I have an enhancements to powerd to inhibit suspend for that issue. The
>  > attached proof of concept patch is heavy on tracing, should apply, maybe
>  > with an offset, and needs /etc/powerd/flags/modules-inhibits created
>  > containing usb_wwan. Once usb_wwan is inserted in the kernel, it remains
>  > in memory you can have NM dispatcher or pppd remove the module when the
>  > connection is torn down to restore normal power management operation.
>  > These features are in testable with au210. Sorry 4g images only, with no
>  > firmware in the image. http://build.laptop.org.au/xo/os/latest/
> 
> is presence of the module really the best way to do this?  is it
> possible to look for the presence of the network interface, or maybe
> simply network traffic, or something similar?  

In the field test reports are saying the modem is getting reset upon
suspend while the trying to connect. Think the 15 second, 5 second if
your in suspend and don't have any other user activity, sleep loop may
not allow enough time to have the modem complete the pppd handshake and
bring up the interface. 

> i assume using the
> existing usb-inhibits is impractical because of the variety of
> devices, is that right?
>   
Yes, that is the reason. We want a one-size-fits-all fix where the user
doesn't have to populate any files. 

> i guess it would be too much to ask for all
> GSM devices to be in the same USB class.  :-/
> 
What would be the appropriate USB class? Mine comes up as usb-storage at
first and usb_modeswitch has to act on it adding time to the connection
routine. 

> (maybe the module presence check is okay -- it just doesn't feel right.)
> 
I think this could be used for other devices also like wedo or usb2vga
maybe.

Jerry

 

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


Re: [Sugar-devel] [ASLO] Release Terminal-36

2012-03-26 Thread Rafael Ortiz
On Mon, Mar 26, 2012 at 11:18 AM, Sugar Labs Activities <
activit...@sugarlabs.org> wrote:

> Activity Homepage:
> http://activities.sugarlabs.org/addon/4043
>
> Sugar Platform:
> 0.82 - 0.96
>
> Download Now:
> http://activities.sugarlabs.org/downloads/file/27938/terminal-36.xo
>
> Release notes:
>
>
>
== Release Notes ==

* New translations
* Pep8 fixes Manuel Kaufmann 
* Avoid Escape key disable fullscreen mode) Manuel Kaufmann 

== Sources ==
http://download.sugarlabs.org/sources/sucrose/fructose/Terminal/Terminal-36.tar.bz2




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


[Sugar-devel] [ASLO] Release Terminal-36

2012-03-26 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4043

Sugar Platform:
0.82 - 0.96

Download Now:
http://activities.sugarlabs.org/downloads/file/27938/terminal-36.xo

Release notes:



Sugar Labs Activities
http://activities.sugarlabs.org

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


Re: [Sugar-devel] [PATCH 1/2] Avoid Escape key disable fullscreen mode

2012-03-26 Thread Manuel Kaufmann
On Mon, Mar 26, 2012 at 12:34, Rafael Ortiz  wrote:
> Thanks applied as:

Cool! I'm very happy! :)

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Patch: Mobile dongles

2012-03-26 Thread Paul Fox
jerry wrote:
 > On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote:
 > > David
 > > 
 > > This message was sent with a gsm dongle on an xo-1
 > >  
 > >  modem:Huawei E160E
 > >  carrier:Locked to Dodo (an Optus reseller)
 > >  XO-1
 > >  OS31 development which is same as os884 signed
 > >  
 > >  in my settings, enter username, password, leave *99# unaltered, dodolns1, 
 > > blank, blank
 > >  
 > >  turn off power management, because XO looses connection in sleep mode
 > 
 > I have an enhancements to powerd to inhibit suspend for that issue. The
 > attached proof of concept patch is heavy on tracing, should apply, maybe
 > with an offset, and needs /etc/powerd/flags/modules-inhibits created
 > containing usb_wwan. Once usb_wwan is inserted in the kernel, it remains
 > in memory you can have NM dispatcher or pppd remove the module when the
 > connection is torn down to restore normal power management operation.
 > These features are in testable with au210. Sorry 4g images only, with no
 > firmware in the image. http://build.laptop.org.au/xo/os/latest/

is presence of the module really the best way to do this?  is it
possible to look for the presence of the network interface, or maybe
simply network traffic, or something similar?  i assume using the
existing usb-inhibits is impractical because of the variety of
devices, is that right?  i guess it would be too much to ask for all
GSM devices to be in the same USB class.  :-/

(maybe the module presence check is okay -- it just doesn't feel right.)

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 2/2] pep8 syntax fixed

2012-03-26 Thread rafael ortiz

On 20/03/12 12:57, Manuel Kaufmann wrote:

Removed trailing spaces and added one more space before the inline comment
---
  terminal.py |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/terminal.py b/terminal.py
index aed612a..6de7500 100644
--- a/terminal.py
+++ b/terminal.py
@@ -166,7 +166,7 @@ class TerminalActivity(activity.Activity):
  vt = self._notebook.get_nth_page(self._notebook.get_current_page()).vt
  vt.paste_clipboard()

-def _create_view_toolbar(self): # Zoom toolbar
+def _create_view_toolbar(self):  # Zoom toolbar
  view_toolbar = gtk.Toolbar()

  zoom_out_button = ToolButton('zoom-out')


Thanks applied as
http://git.sugarlabs.org/terminal/mainline/commit/d50827658f9550d95edcbf0a601d638224ce0ac6

Will be in next terminal version (36).

Cheers.



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


Re: [Sugar-devel] [PATCH 1/2] Avoid Escape key disable fullscreen mode

2012-03-26 Thread Rafael Ortiz
On Tue, Mar 20, 2012 at 12:57 PM, Manuel Kaufmann  wrote:

> This commit disconnect the __key_press_cb callback used in
> sugar.graphics.window.Window to handle the Key Press event and connect a
> new
> __key_press_cb callback (inside TerminalActivity) to manage the Escape key
> properly and send this key to the vte module (Virtual Terminal)
>
> This solves ticket: #440
>  - http://bugs.sugarlabs.org/ticket/440
> ---
>  terminal.py |5 +
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/terminal.py b/terminal.py
> index 77001ea..aed612a 100644
> --- a/terminal.py
> +++ b/terminal.py
> @@ -53,6 +53,11 @@ class TerminalActivity(activity.Activity):
> def __init__(self, handle):
> activity.Activity.__init__(self, handle)
>
> +# HACK to avoid Escape key disable fullscreen mode on Terminal
> Activity
> +# This is related with http://bugs.sugarlabs.org/ticket/440
> +self.disconnect_by_func(self._Window__key_press_cb)
> +self.connect('key-press-event', self.__key_press_cb)
> +
> self.max_participants = 1
>
> toolbar_box = ToolbarBox()
> --
> 1.7.9.1
>
> Thanks applied as:

http://git.sugarlabs.org/terminal/mainline/commit/f88b809dfb7c8f237ab7735f50ec4b8546ac4471

Will be in next terminal version.


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


Re: [Sugar-devel] Jabber behavior 0s833 vs Trisquel 5.5 sweets Distribution - questions

2012-03-26 Thread Aleksey Lim
On Mon, Mar 26, 2012 at 07:23:01AM -0700, Thomas Gilliard wrote:
> Jabber is still missing getting names of others who join Chat.

Thanks for logs. Will try to settle down this issue next month
during the work on HD-0.2(3):


http://wiki.sugarlabs.org/go/Platform_Team/Harmonic_Distribution/1.0/Todo#0.2

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


Re: [Sugar-devel] [PATCH] Recreate corrupted key pair (#1568)

2012-03-26 Thread Sascha Silbe
Excerpts from James Cameron's message of 2012-03-24 01:05:57 +0100:

> Reviewed-by: James Cameron 

Thanks for the review!

Sascha

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


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


[Sugar-devel] [PATCH v2 sugar] Recreate corrupted key pair (fixes SL#1568)

2012-03-26 Thread Sascha Silbe
Recreate a corrupted key pair instead of leaving it alone and failing horribly
later.

This case was encountered two years ago (OLPC#9612 [2]) and recently again
in Nicaragua.

[1] https://bugs.sugarlabs.org/ticket/1568
[2] https://dev.laptop.org/ticket/9612

Signed-off-by: Sascha Silbe 
Signed-off-by: Daniel Drake 
Reviewed-by: James Cameron 
---
 v1->v2: updated my email address, fixed some minor style issues

 Thanks to Daniel for digging this up! We indeed forgot to review and apply
 the sugar part of the patch series.

 src/jarabe/intro/window.py |   27 ---
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/jarabe/intro/window.py b/src/jarabe/intro/window.py
index f7937b1..a6a2a29 100644
--- a/src/jarabe/intro/window.py
+++ b/src/jarabe/intro/window.py
@@ -15,6 +15,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 import os
+import os.path
 import logging
 from gettext import gettext as _
 import gconf
@@ -24,6 +25,7 @@ import gtk
 import gobject

 from sugar import env
+from sugar import profile
 from sugar.graphics import style
 from sugar.graphics.icon import Icon
 from sugar.graphics.xocolor import XoColor
@@ -43,16 +45,27 @@ def create_profile(name, color=None):
 client.set_string('/desktop/sugar/user/color', color.to_string())
 client.suggest_sync()

+if profile.get_pubkey() and profile.get_profile().privkey_hash:
+logging.info('Valid key pair found, skipping generation.')
+return
+
 # Generate keypair
 import commands
 keypath = os.path.join(env.get_profile_path(), 'owner.key')
-if not os.path.isfile(keypath):
-cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
-(s, o) = commands.getstatusoutput(cmd)
-if s != 0:
-logging.error('Could not generate key pair: %d %s', s, o)
-else:
-logging.error('Keypair exists, skip generation.')
+if os.path.exists(keypath):
+os.rename(keypath, keypath + '.broken')
+logging.warning('Existing private key %s moved to %s.broken',
+keypath, keypath)
+
+if os.path.exists(keypath + '.pub'):
+os.rename(keypath + '.pub', keypath + '.pub.broken')
+logging.warning('Existing public key %s.pub moved to %s.pub.broken',
+keypath, keypath)
+
+cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % (keypath, )
+(s, o) = commands.getstatusoutput(cmd)
+if s != 0:
+logging.error('Could not generate key pair: %d %s', s, o)


 class _Page(gtk.VBox):
--
1.7.9

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


[Sugar-devel] Jabber behavior 0s833 vs Trisquel 5.5 sweets Distribution - questions

2012-03-26 Thread Thomas Gilliard

Jabber is still missing getting names of others who join Chat.

Neither of the os833 on XO-1 and XO-1.5 could be identified on 
sweets-distribution 0.94 which shared chat.

Colors and text worked.
All were all on the same wireless AP
Is this a Chat problem or jabber.sugarlabs.org?

Here is a log from Trisquel 5.5 sweets-distribution 0.94.4  today:

Mar 26 06:31:33
Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080testing 
trisquel sugar-distribution install

Mar 26 06:43:20sugar#FF2B34,#00EA111sugar joined the chat
Mar 26 06:43:20sugar#FF2B34,#00EA110hola
Mar 26 06:43:20sugar#FF2B34,#00EA110hay alguien ha y
Mar 26 06:43:20   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F001   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org joined 
the chat

Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080hello
Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080looks like 
it works
Mar 26 06:43:20   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F000testing
Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080my os833 
XO-1 has no name
Mar 26 06:43:20   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F000this  one
Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080sugar: 
hello I am in Bend Oregon USA testing a Trisquel 5.5 install

Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080:-)
Mar 26 06:43:20   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F000I see emoticon
Mar 26 06:43:20   
 3b8c93b2ebabcff3856ff911fb24b22f47e95...@jabber.sugarlabs.org   
 #B20008,#FF2B341   
 3b8c93b2ebabcff3856ff911fb24b22f47e95...@jabber.sugarlabs.org joined 
the chat
Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080my 0s833 
xo-1.5 also has no ID
Mar 26 06:43:20   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F000that is jabber problem?
Mar 26 06:43:20satellit-Tris55#FF2B34,#B200080test from 
trisquel
Mar 26 06:43:20   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F000why is xo-1 not sending name

Mar 26 06:43:02
Mar 26 06:43:21   
 3b8c93b2ebabcff3856ff911fb24b22f47e95...@jabber.sugarlabs.org   
 #B20008,#FF2B341   
 3b8c93b2ebabcff3856ff911fb24b22f47e95...@jabber.sugarlabs.org is here
Mar 26 06:43:21   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org   
 #008009,#FF8F001   
 ac8ad32f0642da769972ed46b041b97803742...@jabber.sugarlabs.org is here
Mar 26 06:43:55satellit-Tris55#FF2B34,#B200080crashed on 
sening emoticon
Mar 26 06:45:07satellit-Tris55#FF2B34,#B200080exiting 
now  thanks for test

Mar 26 06:45:14
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Patch: Mobile dongles

2012-03-26 Thread Paul Fox
fors...@ozonline.com.au wrote:
 > Thanks
 > 
 > I have noticed another issue with the mobile dongle.  OS31, XO-1.75
 > Press the power button once and wait for sleep.  The dongle remains

this is very surprising.  do other USB devices remain powered when the
laptop sleeps?  we've done nothing intentional to change this (or fix this,
depending on your point of view :-) in this release. 

paul

 > powered on (which is a good or bad thing depending on your point of
 > view), then press the power button to wake the laptop, the dongle
 > is briefly turned off and the connection is lost, negating any
 > benefit from keeping it powered during sleep.
 > 
 > Tony
 > 
=-
 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: Mobile dongles

2012-03-26 Thread forster
Thanks

I have noticed another issue with the mobile dongle. OS31, XO-1.75
Press the power button once and wait for sleep. The dongle remains powered on 
(which is a good or bad thing depending on your point of view), then press the 
power button to wake the laptop, the dongle is briefly turned off and the 
connection is lost, negating any benefit from keeping it powered during sleep.

Tony


> On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote:
> > David
> > 
> > This message was sent with a gsm dongle on an xo-1
> >  
> >  modem:Huawei E160E
> >  carrier:Locked to Dodo (an Optus reseller)
> >  XO-1
> >  OS31 development which is same as os884 signed
> >  
> >  in my settings, enter username, password, leave *99# unaltered, dodolns1, 
> > blank, blank
> >  
> >  turn off power management, because XO looses connection in sleep mode
> 
> I have an enhancements to powerd to inhibit suspend for that issue. The
> attached proof of concept patch is heavy on tracing, should apply, maybe
> with an offset, and needs /etc/powerd/flags/modules-inhibits created
> containing usb_wwan. Once usb_wwan is inserted in the kernel, it remains
> in memory you can have NM dispatcher or pppd remove the module when the
> connection is torn down to restore normal power management operation.
> These features are in testable with au210. Sorry 4g images only, with no
> firmware in the image. http://build.laptop.org.au/xo/os/latest/
> 
> Jerry
> 
> _
> This mail has been virus scanned by Australia On Line
> see http://www.australiaonline.net.au/mailscanning

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


[Sugar-devel] Patch: Mobile dongles

2012-03-26 Thread Jerry Vonau
On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote:
> David
> 
> This message was sent with a gsm dongle on an xo-1
>  
>  modem:Huawei E160E
>  carrier:Locked to Dodo (an Optus reseller)
>  XO-1
>  OS31 development which is same as os884 signed
>  
>  in my settings, enter username, password, leave *99# unaltered, dodolns1, 
> blank, blank
>  
>  turn off power management, because XO looses connection in sleep mode

I have an enhancements to powerd to inhibit suspend for that issue. The
attached proof of concept patch is heavy on tracing, should apply, maybe
with an offset, and needs /etc/powerd/flags/modules-inhibits created
containing usb_wwan. Once usb_wwan is inserted in the kernel, it remains
in memory you can have NM dispatcher or pppd remove the module when the
connection is torn down to restore normal power management operation.
These features are in testable with au210. Sorry 4g images only, with no
firmware in the image. http://build.laptop.org.au/xo/os/latest/

Jerry
diff --git a/powerd b/powerd
index e849f87..d6af071 100755
--- a/powerd
+++ b/powerd
@@ -1237,6 +1237,35 @@ inhibited_by_files()
 inhibit_files_present || filetimes_busy $t1
 }
 
+# let the presence of kernel modules inhibit suspend
+kmod_inhibit()
+{
+kmodconf=$CONFIGFLAGS/modules-inhibits
+
+loadedmodules=$(lsmod)
+
+trace kmod looking for $(cat $kmodconf)
+wanted=$(cat $kmodconf)   
+
+for module in $wanted
+do 
+trace kmod looking at $module
+foundmodule=$(lsmod | grep $module)
+if [ x"$foundmodule" = "x" ]
+then 
+foundmodule=
+trace kmod not found
+else
+trace kmod matched $foundmodule
+# implicit return value
+trace kmod busy: $foundmodule
+return 0
+break
+fi
+done
+return 1
+}
+
 usb_inhibit()
 {
 
@@ -1266,7 +1295,7 @@ general_inhibit()
 
 laptop_busy()
 {
-general_inhibit || usb_inhibit || cpu_or_network_busy
+general_inhibit || usb_inhibit || cpu_or_network_busy || kmod_inhibit
 }
 
 if [ -e $TPAD_RECAL ]
@@ -1794,6 +1823,9 @@ snooze()
 then
 inhibited_by_files && break 2
 
+# check kernel modules against kmod_inhibit
+kmod_inhibit && break 2
+
 # recheck network packets.
 check_network_activity finish && break
 fi
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Changing the prompt when inside a Sugar shell

2012-03-26 Thread Sascha Silbe
Excerpts from Manuel Quiñones's message of 2012-03-25 20:47:14 +0200:

> what about changing the prompt when doing:
> 
> ./sugar-jhbuild shell
> 
> Is a bit confusing for me to know which tabs in my GNOME Terminal are
> inside Sugar shells.  I often end calling env and checking for the
> current environment variables.

Good idea. Can you file a ticket upstream [1], please?

Sascha

[1] https://bugzilla.gnome.org/enter_bug.cgi?product=jhbuild
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] Mobile dongles - XO-1 with release 11.3.0

2012-03-26 Thread Sascha Silbe
Excerpts from David Leeming's message of 2012-03-26 04:22:46 +0200:

> I have one old ZTE DC87 modem locked to Digicel that I have tried. I added
> the APN to the modem configuration. When plugged in, Sugar recognises a
> "wireless modem" is plugged in and shows the icon on the frame. If I click
> "connect" it tells me no GSM connection is available.

Make sure you fill in all of Username, Number and Access Point Name
(APN), even if your setup doesn't require them. Sugar < 0.94 refused
to use "incomplete" settings (SL#3321 [1], OLPC-AU#1018 [2]).

If your ISP doesn't require authentication, you can pick any user
name. The "number" for the default connection is "*99#" (without the
quotes).

Sascha

[1] https://bugs.sugarlabs.org/ticket/3321
[2] https://dev.laptop.org.au/issues/1018
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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