Jani Monoses | 1 Apr 2007 09:35
Picon

[sugar] Re: Catch duplicates on service creation?

Dan Williams wrote:
> On Sun, 2007-03-18 at 19:10 -0400, Mike C. Fletcher wrote:
>> I'm finding that while testing with sugar-jhbuild it's quite annoying to 
>> have the service creation bomb out when an existing instance of the 
>> service (presence or clipboard) is active.  That is, it would be useful 
>> if it could simply catch the error and stop trying to create the service 
>> if there is an org.freedesktop.Avahi.CollisionError (local name 
>> collision) error on the attempt to create the services.
> 
> I think you're confusing two different things...  the PresenceService
> and the Clipboard are _dbus_ services, but the Avahi.CollisionError you
> speak of is an mDNS service...  Do you have some tracebacks?

  File "/usr/share/sugar/services/presence/PresenceService.py", line 272, in registerService
    port, domain, sender)
  File "/usr/share/sugar/services/presence/PresenceService.py", line 802, in register_service
    service.register(self._system_bus, self._mdns_service)
  File "/usr/share/sugar/services/presence/Service.py", line 420, in register
    dbus.UInt16(self._port), info)
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 85, in __call__
    return self._proxy_method(*args, **keywords)
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 169, in __call__
    reply_message = self._connection.send_message_with_reply_and_block(message, timeout)
DBusException: org.freedesktop.Avahi.CollisionError: Local name collision

It happens when the emulator crashes or is interrupted with Ctrl-C. sugar-presence-service and
sugar-clipboard keep running so a new registration is not possible unless those are killed
or avahi restarted.

And the emulator can crash when started from a cold cache as pyGtk tries to open a display and coredump
(Continue reading)

Erik Blankinship | 1 Apr 2007 13:34
Favicon
Gravatar

[sugar] active activity?

Hello

What is the preferred way for an activity to know & be notified if it is the
"current" / "in the frame" / "top of the stack" activity?

Maybe I should add a GTK listener on my activity (which extends
activity.Activity)?   If so, which one is recommended: has-toplevel-focus,
is-active?

Does this sound like the correct way to proceed?

Thanks,
Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.laptop.org/pipermail/sugar/attachments/20070401/f80b474c/attachment.html

Alex Polvi | 1 Apr 2007 14:06

[sugar] unique id

On 3/29/07, Dan Williams <dcbw <at> redhat.com> wrote:
> On Wed, 2007-03-28 at 21:22 -0400, Erik Blankinship wrote:
> > Hello
> >
> > We would like to resolve the ambiguity when two kids on the network
> > have the same nickname and colors.  Is there an XO id and how do we
> > access that?  Or should we be thinking about this differently?
>
> from sugar import profile
>
> key = profile.get_pubkey()
>
> If you want a shorter key, you can hash that like:
>
> from sugar import util
>
> key_hash = util._sha_data(key)
> hashed_key = util.printable_hash(key_hash)

This is also convient since we could handle where the laptops backup
goes server side, just by using the pub key and some authorized_keys
magic.

-Alex

Alex Polvi | 1 Apr 2007 14:08

[sugar] rsync directory?

On 3/31/07, Erik Blankinship <erikb <at> mediamods.com> wrote:
> Hello
>
> What is the path to the directory which will be backed up to the school
> server with rsync?

For now we are operating under the assumption that it is
/home/olpc/Journal/. This, of course, is subject to change as
configuration is added.

Are you working on some tools? Here is a silly rsync wrapper to get
things started...

  http://polvi.net/git/?p=olpc-backup.git;a=blob;hb=HEAD;f=src/backup-xo.py

-Alex

Erik Blankinship | 1 Apr 2007 14:19
Favicon
Gravatar

[sugar] rsync directory?

> For now we are operating under the assumption that it is
> /home/olpc/Journal/. This, of course, is subject to change as
> configuration is added.

Thanks Alex.  My sugar activities cannot mkdir new subdirectories in
/home/olpc/Journal/

Is there a preferred way to store files in that directory?

Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.laptop.org/pipermail/sugar/attachments/20070401/31e6734e/attachment.html

Tomeu Vizoso | 1 Apr 2007 16:00

[sugar] active activity?

On Sun, 2007-04-01 at 11:34 -0400, Erik Blankinship wrote:
> Hello
> 
> What is the preferred way for an activity to know & be notified if it
> is the "current" / "in the frame" / "top of the stack" activity?
> 
> Maybe I should add a GTK listener on my activity (which extends
> activity.Activity)?   If so, which one is recommended:
> has-toplevel-focus, is-active?
> 
> Does this sound like the correct way to proceed?

Hi Eric, I've been using focus-out-event/focus-in-event on the Activity
(gtk.Window). I think TamTam also uses that for pausing/resuming sound.

HTH,

Tomeu

Marco Pesenti Gritti | 1 Apr 2007 17:34
Picon
Favicon

[sugar] New xulrunner

On Thu, 2007-03-29 at 16:10 -0700, Guido van Rossum wrote:
> When I try this on my ubundu dapper box, I consistently get this
> problem building mozilla:
> 
> c++ -o xulrunner-bin  -fno-rtti -fno-exceptions -Wall -Wconversion
> -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth
> -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic
> -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O  nsXULRunnerApp.o
> nsRegisterGREUnix.o   -lpthread    -L../../dist/bin -L../../dist/lib
> -L../../dist/bin -lmozjs ../../dist/lib/libxpcomglue_s.a
> -L../../dist/bin -Wl,-rpath-link,../../dist/bin -lxpcom -lxul
> -L/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl
> -L/home/guido/xo/sugar-jhbuild/build/lib -lgtk-x11-2.0 -latk-1.0
> -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0
> -lcairo -lgmodule-2.0 -ldl -lgobject-2.0 -lglib-2.0
> -L../../gfx/cairo/cairo/src -lmozcairo -L../../gfx/cairo/libpixman/src
> -lmozlibpixman   -L/usr/X11R6/lib -lXrender -lfreetype -lfontconfig
> -L/usr/X11R6/lib -lX11  -ldl -lm
> /usr/local/google/home/guido/xo/sugar-jhbuild/build/lib/libpangoxft-1.0.so.0:
> undefined reference to `g_type_register_static_simple'
> /usr/local/google/home/guido/xo/sugar-jhbuild/build/lib/libpangoft2-1.0.so.0:
> undefined reference to `pango_quantize_line_geometry'
> /usr/local/google/home/guido/xo/sugar-jhbuild/build/lib/libpangoft2-1.0.so.0:
> undefined reference to `pango_font_describe_with_absolute_size'

I had access to a Dapper box today and I probably tracked this down
finally. It's a problem with the library search path. If you remove
-L/usr/lib or move it after -L/home/guido/xo/sugar-jhbuild/build/lib
linking should work.

(Continue reading)

Marco Pesenti Gritti | 1 Apr 2007 17:39
Picon
Favicon

[sugar] active activity?

On Sun, 2007-04-01 at 20:00 +0200, Tomeu Vizoso wrote:
> On Sun, 2007-04-01 at 11:34 -0400, Erik Blankinship wrote:
> > Hello
> > 
> > What is the preferred way for an activity to know & be notified if it
> > is the "current" / "in the frame" / "top of the stack" activity?
> > 
> > Maybe I should add a GTK listener on my activity (which extends
> > activity.Activity)?   If so, which one is recommended:
> > has-toplevel-focus, is-active?
> > 
> > Does this sound like the correct way to proceed?
> 
> Hi Eric, I've been using focus-out-event/focus-in-event on the Activity
> (gtk.Window). I think TamTam also uses that for pausing/resuming sound.
> 

I think we are going to add better support for this for BTest-3. Focus
in/out should work well enough until then though.

Marco

Marco Pesenti Gritti | 1 Apr 2007 17:54
Picon
Favicon

[sugar] rsync directory?

On Sat, 2007-03-31 at 10:37 -0400, Erik Blankinship wrote:
> Hello
> 
> What is the path to the directory which will be backed up to the
> school server with rsync?
> 

For Trial1 it will be the home directory. /home/olpc

Marco

Guido van Rossum | 1 Apr 2007 21:12
Favicon

[sugar] New xulrunner

Yup, that seems to have worked. Thanks!

On 4/1/07, Marco Pesenti Gritti <mpg <at> redhat.com> wrote:
> On Thu, 2007-03-29 at 16:10 -0700, Guido van Rossum wrote:
> > When I try this on my ubundu dapper box, I consistently get this
> > problem building mozilla:
> >
> > c++ -o xulrunner-bin  -fno-rtti -fno-exceptions -Wall -Wconversion
> > -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth
> > -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic
> > -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O  nsXULRunnerApp.o
> > nsRegisterGREUnix.o   -lpthread    -L../../dist/bin -L../../dist/lib
> > -L../../dist/bin -lmozjs ../../dist/lib/libxpcomglue_s.a
> > -L../../dist/bin -Wl,-rpath-link,../../dist/bin -lxpcom -lxul
> > -L/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl
> > -L/home/guido/xo/sugar-jhbuild/build/lib -lgtk-x11-2.0 -latk-1.0
> > -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0
> > -lcairo -lgmodule-2.0 -ldl -lgobject-2.0 -lglib-2.0
> > -L../../gfx/cairo/cairo/src -lmozcairo -L../../gfx/cairo/libpixman/src
> > -lmozlibpixman   -L/usr/X11R6/lib -lXrender -lfreetype -lfontconfig
> > -L/usr/X11R6/lib -lX11  -ldl -lm
> > /usr/local/google/home/guido/xo/sugar-jhbuild/build/lib/libpangoxft-1.0.so.0:
> > undefined reference to `g_type_register_static_simple'
> > /usr/local/google/home/guido/xo/sugar-jhbuild/build/lib/libpangoft2-1.0.so.0:
> > undefined reference to `pango_quantize_line_geometry'
> > /usr/local/google/home/guido/xo/sugar-jhbuild/build/lib/libpangoft2-1.0.so.0:
> > undefined reference to `pango_font_describe_with_absolute_size'
>
> I had access to a Dapper box today and I probably tracked this down
> finally. It's a problem with the library search path. If you remove
(Continue reading)


Gmane