Broken XO-1 battery (battery LED flashes red)
Hi The battery LED is flashing red and ec-abnormal@ . at the OFW (version Q2E41) prompt gives back the value c. What does c mean? Can it be fixed? Regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Some testing notes for OS10 for the XO-1
Keyboard/Mouse problem after resume: - external USB keyboard works fine after resume - I have attached an extract of the messages file with suspend, wait 5 min, resume (suspend and resume with power button), but I don't know what could be related to keyboard/mouse. On 12/14/2009 02:43 PM, Paul Fox wrote: smparrish will correct me if i'm wrong, but i believe the release you're testing runs powerd, not ohmd. the presence of the control panel, and its inability to control powerd's behavior, is a bug, or an unimplemented feature -- take your pick. (you can disable powerd if you wish, with initctl stop powerd, and move /etc/events.d/powerd elsewhere. then start ohmd as you did below.) i'm curious about the keyboard/mouse not waking things up properly, but i have zero time to look at it currently. to prevent powerd from suspending the laptop, edit /etc/powerd/powerd.conf, and adjust the timeout s to something big, like 9. paul philipp wrote: Switching off pm doesn't work (with control panel GUI or command): [o...@xo-11-08-d6 logs]$ sugar-control-panel -s automatic_pm off /usr/lib/python2.6/site-packages/sugar/util.py:25: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha sugar-control-panel: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ohm was not provided by any .service files After starting ohmd with sudo service ohmd start (per default service ohmd is off for all runlevels) it is possible to switch off automatic_pm (at least no error anymore), but it still suspends after some time and with resume is the same problem as before. Is ohmd supposed to be on or off? On 12/12/2009 01:55 AM, Steven M. Parrish wrote: If you are going to try out OS10 for the XO-1 here are a few things that need testing. Does it boot consistently into Sugar? Gnome? Any strange lockups? If so what were you doing? Can you upgrade packages using yum update from the command line? Does sound work? Can you suspend? Does it wake up? Please report any issues you have. Steven ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel =- paul fox, p...@laptop.org Dec 14 09:45:22 xo-11-08-d6 kernel: [ 1133.472876] dcon_freeze_store: 1 Dec 14 09:45:22 xo-11-08-d6 kernel: [ 1133.472935] dcon_source_switch to DCON Dec 14 09:45:22 xo-11-08-d6 olpc-kbdshim-hal[1618]: idle timers set to 120 130 240 Dec 14 09:45:22 xo-11-08-d6 kernel: [ 1133.490375] olpc-dcon: The DCON has control Dec 14 09:45:22 xo-11-08-d6 kernel: [ 1133.580215] dcon_freeze_store: 1 Dec 14 09:45:23 xo-11-08-d6 kernel: [ 1134.435189] dcon_freeze_store: 0 Dec 14 09:45:23 xo-11-08-d6 kernel: [ 1134.435235] dcon_source_switch to CPU Dec 14 09:45:23 xo-11-08-d6 kernel: [ 1134.456591] olpc-dcon: The CPU has control Dec 14 09:45:29 xo-11-08-d6 kernel: [ 1140.549089] usb 1-1: USB disconnect, address 8 Dec 14 09:45:29 xo-11-08-d6 avahi-daemon[1510]: Interface eth0.IPv4 no longer relevant for mDNS. Dec 14 09:45:29 xo-11-08-d6 avahi-daemon[1510]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.144. Dec 14 09:45:29 xo-11-08-d6 avahi-daemon[1510]: Withdrawing address record for fe80::217:c4ff:fe11:8d6 on eth0. Dec 14 09:45:29 xo-11-08-d6 avahi-daemon[1510]: Withdrawing address record for 192.168.1.144 on eth0. Dec 14 09:45:29 xo-11-08-d6 dhclient: receive_packet failed on eth0: Network is down Dec 14 09:45:29 xo-11-08-d6 NetworkManager: info (eth0): supplicant connection state: completed - disconnected Dec 14 09:45:29 xo-11-08-d6 NetworkManager: info (eth0): now unmanaged Dec 14 09:45:29 xo-11-08-d6 NetworkManager: info (eth0): device state change: 8 - 1 (reason 36) Dec 14 09:45:29 xo-11-08-d6 NetworkManager: info (eth0): deactivating device (reason: 36). Dec 14 09:45:29 xo-11-08-d6 NetworkManager: info eth0: canceled DHCP transaction, dhcp client pid 3038 Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1140.63] PM: Syncing filesystems ... done. Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1140.640153] Freezing user space processes ... (elapsed 0.01 seconds) done. Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1140.658149] Freezing remaining freezable tasks ... (elapsed 1.08 seconds) done. Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1141.746749] Suspending console(s) (use no_console_suspend to debug) Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1141.767021] mmc_suspend_host: turning off power on mmc0 Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1141.767047] sdhci_set_ios: power off for mmc0 from c05e60d1 Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1141.767155] sdhci-pci :00:0c.1: PME# disabled Dec 14 09:50:51 xo-11-08-d6 kernel: [ 1141.773519] sdhci_pci_probe: Enable PME set to 0x1a0c108 Dec 14 09:50:51 xo-11-08-d6 kernel:
Re: Some testing notes for OS10 for the XO-1
Hi Steven - The scratch sensor board doesn't work (works with build 802) I hoped allow olpc access to ttyUSB nodes (from release notes os10) would make it work. I added an extract of /var/log/messages at the bottom of the email. - timezone can not be changed in gnome since administration menu is missing (changing the timezone in sugar control panel has no effect in gnome). And talking about time, I think the clock activity is really nice and useful. - build information OLPC release 11 (Leonidas) in sugar control panel is more confusing than helpful. What about 10 (based on Fedora 11)? Does it boot consistently into Sugar? Gnome? Worked fine here. Does sound work? Yes,no problem. Can you suspend? Does it wake up? Suspend yes, but no proper wake up as mentioned by other testers (but the shutdown with the power button is really nice and useful). Regards, Philipp Plug in Scratch Sensor board with build 10 on Fedora 11: Dec 12 07:56:16 xo-11-08-d6 kernel: [ 88.687028] usb 1-2: new full speed USB device using ohci_hcd and address 2 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 88.908698] usb 1-2: configura tion #1 chosen from 1 choice Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] usbcore: registere d new interface driver usbserial Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] USB Serial support registered for generic Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] usbcore: registere d new interface driver usbserial_generic Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] usbserial: USB Ser ial Driver core Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.162673] USB Serial support registered for pl2303 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.162861] pl2303 1-2:1.0: pl 2303 converter detected Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.185652] usb 1-2: pl2303 co nverter now attached to ttyUSB0 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.185960] usbcore: registere d new interface driver pl2303 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.185982] pl2303: Prolific P L2303 USB to serial adaptor driver Dec 12 07:56:17 xo-11-08-d6 NetworkManager: info (ttyUSB0): ignori ng due to lack of mobile broadband capabilties Plug in Scratch Sensor board with build 802 on Fedora 9: Dec 13 08:48:55 localhost kernel: [ 155.465098] hub_port_wait_reset: portstatus=501 portchange=10 Dec 13 08:48:55 localhost kernel: [ 155.536006] hub_port_wait_reset: portstatus=100 portchange=1 Dec 13 08:48:55 localhost kernel: [ 155.539599] hub_port_wait_reset: device went away! Dec 13 08:48:55 localhost kernel: [ 155.549596] hub 2-0:1.0: unable to enumerate USB device on port 2 Dec 13 08:48:55 localhost kernel: [ 155.831725] hub_port_wait_reset: portstatus=103 portchange=10 Dec 13 08:48:55 localhost kernel: [ 155.904029] usb 1-2: new full speed USB device using ohci_hcd and address 4 Dec 13 08:48:55 localhost kernel: [ 155.997296] hub_port_wait_reset: portstatus=103 portchange=10 Dec 13 08:48:56 localhost kernel: [ 156.077180] usb 1-2: configuration #1 chosen from 1 choice Dec 13 08:48:56 localhost kernel: [ 156.413019] usbcore: registered new interface driver usbserial Dec 13 08:48:56 localhost kernel: [ 156.417722] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic Dec 13 08:48:56 localhost kernel: [ 156.431937] usbcore: registered new interface driver usbserial_generic Dec 13 08:48:56 localhost kernel: [ 156.439535] drivers/usb/serial/usb-serial.c: USB Serial Driver core Dec 13 08:48:56 localhost kernel: [ 156.476346] drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303 Dec 13 08:48:56 localhost kernel: [ 156.479963] pl2303 1-2:1.0: pl2303 converter detected Dec 13 08:48:56 localhost kernel: [ 156.516365] usb 1-2: pl2303 converter now attached to ttyUSB0 Dec 13 08:48:56 localhost kernel: [ 156.522309] usbcore: registered new interface driver pl2303 Dec 13 08:48:56 localhost kernel: [ 156.536892] drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Some testing notes for OS10 for the XO-1
The Prolific driver gets loaded (see logs at the bottom). The problem are the permissions. After plugging in the scratch board ll /dev/ttyUSB0 shows: crw-rw 1 root dialout 188, 0 2009-12-14 09:52 /dev/ttyUSB0 User olpc is not in group dialout which means it doesn't have access to ttyUSB0. After adding olpc to group dialout the scratch board works fine. Regards, Philipp On 12/13/2009 11:17 PM, John Maloney wrote: Hi, Steven. The USB-serial cable that comes with the Scratch Sensor board needs a driver from Prolifix. That driver used to be included in the builds, but perhaps it was accidentally dropped? If you use a supported USB-serial adaptor cable, then I think the ScratchBoard will work. I just got a report that sound playback is rough on XO 1.5: http://dev.laptop.org/ticket/9375 I'm guessing this is caused by a switch from ALSA to PulseAudio. We've seen that on Ubuntu; we still working to resolve the problem. PulseAudio itself has some buffering issues, although it appears that folks are working on those. The problems tend to show up more in applications where sounds are triggered dynamically, such as Scratch, EToys, and games, vs. playing music. -- John On Dec 13, 2009, at 4:00 AM, Philipp Kocher wrote: Hi Steven - The scratch sensor board doesn't work (works with build 802) I hoped allow olpc access to ttyUSB nodes (from release notes os10) would make it work. I added an extract of /var/log/messages at the bottom of the email. - timezone can not be changed in gnome since administration menu is missing (changing the timezone in sugar control panel has no effect in gnome). And talking about time, I think the clock activity is really nice and useful. - build information OLPC release 11 (Leonidas) in sugar control panel is more confusing than helpful. What about 10 (based on Fedora 11)? Does it boot consistently into Sugar? Gnome? Worked fine here. Does sound work? Yes,no problem. Can you suspend? Does it wake up? Suspend yes, but no proper wake up as mentioned by other testers (but the shutdown with the power button is really nice and useful). Regards, Philipp Plug in Scratch Sensor board with build 10 on Fedora 11: Dec 12 07:56:16 xo-11-08-d6 kernel: [ 88.687028] usb 1-2: new full speed USB device using ohci_hcd and address 2 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 88.908698] usb 1-2: configura tion #1 chosen from 1 choice Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] usbcore: registere d new interface driver usbserial Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] USB Serial support registered for generic Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] usbcore: registere d new interface driver usbserial_generic Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.080490] usbserial: USB Ser ial Driver core Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.162673] USB Serial support registered for pl2303 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.162861] pl2303 1-2:1.0: pl 2303 converter detected Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.185652] usb 1-2: pl2303 co nverter now attached to ttyUSB0 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.185960] usbcore: registere d new interface driver pl2303 Dec 12 07:56:17 xo-11-08-d6 kernel: [ 89.185982] pl2303: Prolific P L2303 USB to serial adaptor driver Dec 12 07:56:17 xo-11-08-d6 NetworkManager: info (ttyUSB0): ignori ng due to lack of mobile broadband capabilties Plug in Scratch Sensor board with build 802 on Fedora 9: Dec 13 08:48:55 localhost kernel: [ 155.465098] hub_port_wait_reset: portstatus=501 portchange=10 Dec 13 08:48:55 localhost kernel: [ 155.536006] hub_port_wait_reset: portstatus=100 portchange=1 Dec 13 08:48:55 localhost kernel: [ 155.539599] hub_port_wait_reset: device went away! Dec 13 08:48:55 localhost kernel: [ 155.549596] hub 2-0:1.0: unable to enumerate USB device on port 2 Dec 13 08:48:55 localhost kernel: [ 155.831725] hub_port_wait_reset: portstatus=103 portchange=10 Dec 13 08:48:55 localhost kernel: [ 155.904029] usb 1-2: new full speed USB device using ohci_hcd and address 4 Dec 13 08:48:55 localhost kernel: [ 155.997296] hub_port_wait_reset: portstatus=103 portchange=10 Dec 13 08:48:56 localhost kernel: [ 156.077180] usb 1-2: configuration #1 chosen from 1 choice Dec 13 08:48:56 localhost kernel: [ 156.413019] usbcore: registered new interface driver usbserial Dec 13 08:48:56 localhost kernel: [ 156.417722] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic Dec 13 08:48:56 localhost kernel: [ 156.431937] usbcore: registered new interface driver usbserial_generic Dec 13 08:48:56 localhost kernel: [ 156.439535] drivers/usb/serial/usb-serial.c: USB Serial Driver core Dec 13 08:48:56 localhost kernel: [ 156.476346] drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303 Dec 13 08:48:56 localhost kernel: [ 156.479963] pl2303 1-2:1.0: pl2303 converter detected Dec 13 08:48:56 localhost kernel
Re: Some testing notes for OS10 for the XO-1
Switching off pm doesn't work (with control panel GUI or command): [o...@xo-11-08-d6 logs]$ sugar-control-panel -s automatic_pm off /usr/lib/python2.6/site-packages/sugar/util.py:25: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha sugar-control-panel: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ohm was not provided by any .service files After starting ohmd with sudo service ohmd start (per default service ohmd is off for all runlevels) it is possible to switch off automatic_pm (at least no error anymore), but it still suspends after some time and with resume is the same problem as before. Is ohmd supposed to be on or off? On 12/12/2009 01:55 AM, Steven M. Parrish wrote: If you are going to try out OS10 for the XO-1 here are a few things that need testing. Does it boot consistently into Sugar? Gnome? Any strange lockups? If so what were you doing? Can you upgrade packages using yum update from the command line? Does sound work? Can you suspend? Does it wake up? Please report any issues you have. Steven ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: About 8.2.2
- It won't be signed by OLPC. You have to be on an unlocked XO, or be a deployment signing your own builds. Is there a reason why 8.2.2 doesn't get signed by OLPC? I do understand that the main target group are big deployments which can sign the build, but why are others excluded? In the past even release candidates like build 800 got signed by OLPC. Cheers Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: About 8.2.2
Hi Ed, Martin What is the plan for the Fedora 11 build for XO-1, will OLPC sign such a build or is 802 the last build signed by OLPC? I don't think one of the two options is a good solution for small deployments without a tech team. I think for the case of Cambodia with many small deployments (educational NGOs got XOs donated from G1G1/OLPC or other donors), no signed builds probably means that the XOs don't get updated anymore. Best regards, Philipp On 12/01/2009 08:04 PM, Ed McNierney wrote: Philipp - An OS image signed by OLPC can be booted by any XO-1.0 laptop in the world, except for those which have been reconfigured by a deployment to only respect software signed by other security keys. That implies a higher level of testing and certification than an image that can be selectively adopted by specific deployments who can do their own testing to decide whether that release is suitable for their application. As OLPC's deployments grow both in number of total laptops deployed and in the number of different localities supported, it becomes increasingly burdensome / difficult to package and test One Image to Boot Them All worldwide. As Martin points out, we are continuing to try to move users toward either (a) using machines with boot-image security disabled, so they can run any software, or (b) using locally-developed and locally-maintained signature authorities to sign OS images for secure boot in local deployments. - Ed On Dec 1, 2009, at 4:14 AM, Philipp Kocher wrote: - It won't be signed by OLPC. You have to be on an unlocked XO, or be a deployment signing your own builds. Is there a reason why 8.2.2 doesn't get signed by OLPC? I do understand that the main target group are big deployments which can sign the build, but why are others excluded? In the past even release candidates like build 800 got signed by OLPC. Cheers Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Fwd: Re: Importing images in Write documents makes file huge
Bonjour Hubert I read on planet.abisource.com (June 26, 2009) that you implemented the JPEG support for abiword 2.7.6. This feature would be very useful for OLPC XO laptops, but the newest release (8.2.1, build 802) for XOs includes still abiword 2.6.4. Is it possible to make a small and low risk JPEG-patch for abiword 2.6.4 so it could be included in release 8.2.2? Work for a Fedora 11 based release (8.2.1 and 8.2.2 are based on Fedora 9) is in progress. This release includes abiword 2.8.1, but it won't be stable enough to install it on student XOs soon (I am not aware of a schedule for this release). Thanks, Philipp Original Message Subject: Re: Importing images in Write documents makes file huge Date: Fri, 27 Nov 2009 15:48:38 +0100 From: Martin Langhoff martin.langh...@gmail.com To: Philipp Kocher philipp.koc...@gmx.net CC: Tomeu Vizoso to...@sugarlabs.org, devel devel@lists.laptop.org On Thu, Nov 26, 2009 at 2:48 PM, Philipp Kocher philipp.koc...@gmx.net wrote: On 11/26/2009 07:06 PM, Tomeu Vizoso wrote: On Thu, Nov 26, 2009 at 09:32, Philipp Kocherphilipp.koc...@gmx.net wrote: The conversion to PNG was a general Abiword feature, but it got solved last July with Abiword 2.7.6 (see link below). On my XO libabiword-2.6.4-6.olpc3 is installed (build 802). Is it possible to install an libabiword-olpc rpm of version 2.7.6 or newer? http://wiki.laptop.org/go/F11_for_XO-1 What about 8.2.x? Only if you can get a patch (from the abiword developers I guess) that fixes the problem on 2.6.4; and the patch is reasonably small and low risk. As Ben points out, this will imply a flag-day change. For people controlling a whole deployment, this may very well be acceptable... and the 8.2.x I am working on is focussed on deployments. cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- School Server Architect - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Importing images in Write documents makes file huge
Hi all, We would like the students to create simple html-documents with text and images and upload them to the schoolserver for a simple homepage. The Write activity (we are using version 60 on build 802) has a feature Keep as Hypertext (HTML), but when images are inserted into the document the files get huge (10 times bigger than original image). If I check the file size in the datastore, an image created with Record (file size 38kB, mimetype image/jpg) inserted in a html document containing nothing else than the image, the html file is 554kB (mimetype text/html). The image is saved in the html-document with: img ... src=data:image/png;base64,{image data} I can do the same thing with Abiword 2.8.1 and the html file is just 52kB, probably because it is using jpg: img ... src=data:image/jpeg;base64,{image data} There is an old ticket for that (last modified 2 years ago): Ticket #1442 non-PNG image support for Abiword Any suggestions for a workaround? Is there an other activity we could use to create html pages? Best regards, Philipp PS: other document types created with Write have the same problem: image/jpg: 38kB (created with Record activity) application/rtf:821kB (created with Write activity) text/html: 554kB (created with Write activity) application/vnd.oasis.opendocument.text: 406kB (created with Write activity, default) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Importing images in Write documents makes file huge
The conversion to PNG was a general Abiword feature, but it got solved last July with Abiword 2.7.6 (see link below). On my XO libabiword-2.6.4-6.olpc3 is installed (build 802). Is it possible to install an libabiword-olpc rpm of version 2.7.6 or newer? http://planet.abisource.com/: July 04, 2009 Marc Maurer: Impressive AbiWord release We just released AbiWord 2.7.6, which is an awesome release in my opinion! It for example adds native JPEG support, so we don’t convert every JPEG internally to PNG anymore. This will be of great benefit on the OLPC laptop, where kids use built-in camera to produce photos in JPEG format and add them to their document. This will greatly reduce the filesize of their document. It will also be a lot less bandwidth intensive when collaborating on such a document. On 11/26/2009 03:01 PM, Philipp Kocher wrote: Hi all, We would like the students to create simple html-documents with text and images and upload them to the schoolserver for a simple homepage. The Write activity (we are using version 60 on build 802) has a feature Keep as Hypertext (HTML), but when images are inserted into the document the files get huge (10 times bigger than original image). If I check the file size in the datastore, an image created with Record (file size 38kB, mimetype image/jpg) inserted in a html document containing nothing else than the image, the html file is 554kB (mimetype text/html). The image is saved in the html-document with: img ... src=data:image/png;base64,{image data} I can do the same thing with Abiword 2.8.1 and the html file is just 52kB, probably because it is using jpg: img ... src=data:image/jpeg;base64,{image data} There is an old ticket for that (last modified 2 years ago): Ticket #1442 non-PNG image support for Abiword Any suggestions for a workaround? Is there an other activity we could use to create html pages? Best regards, Philipp PS: other document types created with Write have the same problem: image/jpg: 38kB (created with Record activity) application/rtf: 821kB (created with Write activity) text/html:554kB (created with Write activity) application/vnd.oasis.opendocument.text: 406kB (created with Write activity, default) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Importing images in Write documents makes file huge
On 11/26/2009 07:06 PM, Tomeu Vizoso wrote: On Thu, Nov 26, 2009 at 09:32, Philipp Kocherphilipp.koc...@gmx.net wrote: The conversion to PNG was a general Abiword feature, but it got solved last July with Abiword 2.7.6 (see link below). On my XO libabiword-2.6.4-6.olpc3 is installed (build 802). Is it possible to install an libabiword-olpc rpm of version 2.7.6 or newer? I guess it depends on how many technical resources you have, but it's definitely possible. Though maybe the best way forward is helping with the effort of making F11 work well on the XO-1s. http://wiki.laptop.org/go/F11_for_XO-1 What about 8.2.x? At the moment the write activity is not really responsive when a few pictures are in the document. I expect that would improve as well. It looks like abiword 2.8.1 is already part of F11 for XO 1, which should solve the problem. But I don't expect F11 being installed on the student XOs very soon, is there an alternative solution like another activity that can create simple html files with pictures? Regards, Tomeu http://planet.abisource.com/: July 04, 2009 Marc Maurer: Impressive AbiWord release We just released AbiWord 2.7.6, which is an awesome release in my opinion! It for example adds native JPEG support, so we don’t convert every JPEG internally to PNG anymore. This will be of great benefit on the OLPC laptop, where kids use built-in camera to produce photos in JPEG format and add them to their document. This will greatly reduce the filesize of their document. It will also be a lot less bandwidth intensive when collaborating on such a document. On 11/26/2009 03:01 PM, Philipp Kocher wrote: Hi all, We would like the students to create simple html-documents with text and images and upload them to the schoolserver for a simple homepage. The Write activity (we are using version 60 on build 802) has a feature Keep as Hypertext (HTML), but when images are inserted into the document the files get huge (10 times bigger than original image). If I check the file size in the datastore, an image created with Record (file size 38kB, mimetype image/jpg) inserted in a html document containing nothing else than the image, the html file is 554kB (mimetype text/html). The image is saved in the html-document with: img ... src=data:image/png;base64,{image data} I can do the same thing with Abiword 2.8.1 and the html file is just 52kB, probably because it is using jpg: img ... src=data:image/jpeg;base64,{image data} There is an old ticket for that (last modified 2 years ago): Ticket #1442 non-PNG image support for Abiword Any suggestions for a workaround? Is there an other activity we could use to create html pages? Best regards, Philipp PS: other document types created with Write have the same problem: image/jpg: 38kB (created with Record activity) application/rtf: 821kB (created with Write activity) text/html:554kB (created with Write activity) application/vnd.oasis.opendocument.text: 406kB (created with Write activity, default) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [Sugar-devel] MANIFEST experiments
The patch is good to reduce the boot time, but doesn't work for activity developers. After applying the patch I run setup.py dist_xo of an activity and got the following error (since read_manifest is supposed to set self.manifest and doesn't do it anymore): Traceback (most recent call last): File ./setup.py, line 3, in module bundlebuilder.start() File /usr/lib/python2.5/site-packages/sugar/activity/bundlebuilder.py, line 493, in start globals()['cmd_' + args[0]](config, args[1:]) File /usr/lib/python2.5/site-packages/sugar/activity/bundlebuilder.py, line 284, in cmd_dist_xo packager.package() File /usr/lib/python2.5/site-packages/sugar/activity/bundlebuilder.py, line 184, in package missing_files = self.builder.check_manifest() File /usr/lib/python2.5/site-packages/sugar/activity/bundlebuilder.py, line 147, in check_manifest if path not in self.config.bundle.manifest: TypeError: argument of type 'NoneType' is not iterable Regards, Philipp James Cameron wrote: Confirmed. On Wed, Oct 14, 2009 at 05:29:09PM +0545, Daniel Drake wrote: So, I reflashed 2 XOs, booted for the first time, entered a name. On one, I modified sugar.bundle.ActivityBundle.read_manifest() to be a no-op, then turned it off. On the other, I just turned it off. I reproduced this experiment. Used build 802, with a limited set of 22 activities [1], with a similar change [2]. Then I powered both on at the same time and started a stopwatch. I measured how long it takes for the XOs to reach the stage of boot where the XO stick figure and the activity icons are visible. 1255565448 power up both XOs 1255565533 modified XO boot complete 1255565539 unmodified XO boot complete The one with the modification reached this point *55* seconds faster than the other one! In my case, about 6 seconds. I feel that even this small time was worth it, so I plan to patch this for the friends' kids I've got laptops deployed to. Is there a collection of 802 performance improvement patches? Notes: 1. the activities installed were from G1G1 Activities for 8.2 and were Browse Calculate Chat Distance Etoys Implode Maze Measure Memorize Moon Paint Pippy Read Record Ruler Scratch Speak TamTamMini TamTamSynthLab Terminal TurtleArt Write 2. the change was to activitybundle.py in /usr/lib/python2.5/site-packages/sugar/bundle/ and removed all code in read_manifest(), leaving just pass: def read_manifest(self): pass ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
[Server-devel] XS 0.6 on XO
Really nice to have an XS on the XO for testing and showing people what they can do with an XS. The easy setup which doesn't even need an access point is really cool. There are 3 points about XS 0.6 on XO I want to bring up: 1. How to shutdown the XS. I couldn't find the information what is the easiest way to do it. I see to easy options: - Switching off power means the XS shuts down (I have attached an acmon script a workmate wrote some time ago for a webserver on an XO which does that using crontab) - ctrl+alt+delete (on the XO delete is fn+erase) does a reboot at the moment, but I think it could be easily changed to a more useful shutdown. 2. How to change the timezone is missing in the documentation, but probably necessary in most places. 3. Non XO computers can not connect to the school-mesh-0 of the XS on XO. I wanted to do some testing and had just one XO (which was running the XS). To be able to connect from a normal laptop I had to do the following changes on the XS (the specific IP is important since various services are bound to this IP): ifdown lanbond0 iwconfig wmesh0 essid schoolserver iwconfig wmesh0 mode ad-hoc iwconfig wmesh0 channel 6 ifconfig wmesh0 172.18.0.1 Is there an easier way? Cheers, Philipp #!/bin/bash #** # Script: acmon # Author: matt # Purpose: checks if ac power gone from xo and schedules shutdown. # If the ac power is restored and there is a shutdown in progress # then the shutdown will be cancelled # Should be run from /etc/crontab as follows : # 00,10,20,30,40,50 * * * * root /usr/local/bin/acmon # NOTE the cron interval needs to less than the SHTDWNTIME # so that the server picks up if the power is back down # Versions: # 0.1 04/04/08Initial Matt # 0.2 05/04/08added -h switch to shudown Matt #** # Length of time before shutdown SHTDWNTIME=15 # if there is no ac power if [ $(cat /sys/class/power_supply/olpc-ac/online) = 0 ]; then # if there no shutdown in progress then schedule on in 15 mins pgrep shutdown /dev/null 21 if [ $? -ne 0 ]; then shutdown -h $SHTDWNTIME power failed /dev/null 21 logger -p info acmon: Shutting down in $SHTDWNTIME minutes due to ac pwr failure else logger -p info acmon: No ac power and shutdown already in progress fi else # if there is ac power and a shutdown in progress cancel it... pgrep shutdown /dev/null 21 if [ $? -eq 0 ]; then shutdown -c /dev/null 21 logger -p info acmon: Cancelling shutdown due to ac pwr restore fi fi ___ Server-devel mailing list server-de...@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
sugar-install-bundle doesn't work with content bundles (build 802)
Hi all, For a deployment without a schoolserver I needed a script to install bundles (.xo and .xol) from a USB flash drive. I wanted to use the script for initial installation of bundles, installing upgrades and reinstall by mistake erased activities. I know the option with the customization.zip, but I don't want to reboot. To call sugar-install-bundles in a script seemed to be a good solution: for i in ${USB_BUNDLES_DIR}/*.xo*; do sugar-install-bundle $i done But I faced to problems: 1. sugar-install-bundle doesn't support installing content/library bundles 2. sugar-install-bundle doesn't support upgrading from an old version of a bundle to a newer one So I wrote a version of sugar-install-bundle that solves these two problems (see attachment). It is slow, but it works. Best regards, Philipp #!/usr/bin/env python import sys import gobject import bitfrost.update.actutils as actutils import bitfrost.update.actinfo as actinfo from sugar.bundle.contentbundle import ContentBundle from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) loop = gobject.MainLoop() from sugar.activity.registry import get_registry registry = get_registry() def cmd_help(): print 'Usage: sugar-install-bundle [ bundlename ] \n\n\ Install an activity bundle (.xo). \n' if len(sys.argv) != 2: cmd_help() sys.exit(2) bundleHelper = actutils.BundleHelper(sys.argv[1]) if not bundleHelper.is_installed(): bundleHelper.install_or_upgrade(registry) print sugar-install-bundle: Installed new bundle '%s' % (sys.argv[1]) else: if bundleHelper.is_activity: bundleVersion = bundleHelper.bundle.get_activity_version() installedVersion = registry.get_activity(bundleHelper.bundle.get_bundle_id()).version else: bundleVersion = bundleHelper.bundle.get_library_version() installedLibrary = ContentBundle(bundleHelper.bundle.get_root_dir()) installedVersion = installedLibrary.get_library_version() if bundleVersion installedVersion: bundleHelper.install_or_upgrade(registry) print sugar-install-bundle: Upgraded bundle '%s' from version '%s' to '%s' % \ (sys.argv[1], installedVersion, bundleVersion) else: print sugar-install-bundle: Bundle '%s' (version '%s') is not newer than \ installed version '%s' % (sys.argv[1], bundleVersion, installedVersion) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Create and sign Country specific XO image
The XOs got manufactured some time ago and just not delivered because localization wasn't finished (localization is still not finished, but the XO arrived yesterday). So getting our own keys in the manufacturing data is not an option. I hoped for an easier image creation and signing process. What is the problem with the process described here http://blog.olenepal.org/index.php/archives/183? 1. setup one XO the way you want it (I would use a script to do this) 2. delete a few files 3. create the image with save-nand at the ok prompt. 4. If I could send the CRC file of the image to OLPC and they would give me a fs.zip in return, that would be great. This way I could use the NandBlaster for the first installation and would be much faster than installing os802.img from USB flash drive and call the customization script on the flash drive on each XO. Daniel Drake wrote: On Fri, 2009-06-26 at 11:25 +0700, Philipp Kocher wrote: Hello Cambodia is getting 1000 new XOs very soon. This are the first ones with a Khmer keyboard. To make the installation process easier, I would like to create a country specific image based on build 802, which includes Khmer keyboard support, fonts, the newest language pack with software translations, Activities and some customizations. Image builder can do all this: http://wiki.laptop.org/go/Image_builder You'll have to script some of those customizations. The other option is to use pilgrim, which is what I think they do in Nepal. Looking back, I think this is a better option than image builder for the non-activity customizations, but image builder is probably a bit easier to get started with. You have to decide if you want to sign your own builds, or if you want to get OLPC to do it (if they will do so). To do it yourself you have to generate your own public/private keys and somehow get those public keys to be present in the manufacturing data on all of your laptops. Full details here: http://wiki.laptop.org/go/Firmware_security#Multiple-Key_Support The bios-crypto code is what you will use to sign your images. Daniel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Create and sign Country specific XO image
Hello Cambodia is getting 1000 new XOs very soon. This are the first ones with a Khmer keyboard. To make the installation process easier, I would like to create a country specific image based on build 802, which includes Khmer keyboard support, fonts, the newest language pack with software translations, Activities and some customizations. I found just very few information about creating a country specific image (mainly from Nepal): http://tiezemans.wordpress.com/2008/12/30/customizing-the-xo-image/ http://blog.olenepal.org/index.php/archives/183 http://wiki.laptop.org/go/Customizing_NAND_images How can I get a country specific image file signed? Which other customizations or bugfixes are recommended to be included (e.g. like the ones from paraguay http://lists.laptop.org/pipermail/devel/2009-March/023788.html)? Detailed instructions from other deployments about creating an image are very welcome. Thanks and best regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Battery recovery issues
Emiliano Pastorino wrote: Hello everyone, I'm trying to recover a battery than seems to be broken. This is what I've done so far: - I've plugged the battery on an unsecured XO. - When I run watch-battery from the ok prompt, I get a No battery message. - I tried see-bstate and I get an infinite output of 0 1 2 0 1 2 0 1 2 0 1 2 - Battery led never flashes. - If I use a known good battery, I get all the expected results (led turns on, nice output from the commands above). Besides, I tried to use batman.fth, but when I run fload nand:\batman.fth I get The file 'nand:\olpc.fth' cannot be opened. I've downloaded batman.fth from http://dev.laptop.org/pub/firmware/scripts/batman.fth and placed it in / . Put batman.fth in /home/olpc and try fload nand:\home\olpc\batman.fth. nand:\ at the ok prompt is not / in linux, check with dir nand:\ at the ok prompt. Try to reset the battery with 1w-init bat-set-low and bat-recover, I have seen a battery with the see-bstate problem working afterwards. Good luck. I'm using firmware Q2E35. Is that battery unrecoverable? How can I tell the difference between a completely broken battery and a broken-but-recoverable one? Any tips? Emiliano ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: XO boot problem
Hi Daniel Thanks for the input. The XO is booting fine after the firmware update. I was looking for the bootfw.zip online, older released firmware versions have the bootfw.zip in this directory: http://dev.laptop.org/pub/firmware/q2e18/ But you are right, I can just copy the bootfw.zip from a working XO with build 767 installed. The ticket 7607 got fixed with q2e12 so it shouldn't happen with build 767 (q2e18) anymore. But I got the information that 3 XOs with build 767 had the same problem. They got fixed with a clean install, so no way for further diagnosis. Regards, Philipp Daniel Drake wrote: 2009/3/10 Philipp Kocher philipp.koc...@gmx.net: Hi, An other school in Cambodia has the problem that several XOs don't boot anymore. Some of the XOs have build 708 and other ones build 767 installed. All are in secure mode. With a dignostic startup the following information is last shown on the screen: OLPC C2, 256 MiB memory installed, S/N CSN75001163 OpenFirmware CL1 Q2D16 Q2D Nothing happens anymore afterwards. The OFW hardware diagnostic is still working. After a clean install the XO works fine again but all the data is lost. Has anyone a solution for that problem or input for further diagnosis? This is a common problem seen by several deployments: http://dev.laptop.org/ticket/7607 It is caused when machines are shut down improperly - i.e. the child holds the power button for 5secs to turn off the laptop, or all power sources are removed (i.e. battery + AC connected, no AC and battery runs to zero, etc), or if the XO hard-crashes and you are forced to shut down uncleanly. The solution is to upgrade firmware to e.g. q2e18. While the firmware update will solve the immediate problem where OpenFirmware crashes when minor corruption is encountered, unclean shutdowns will lead to file corruption causing more, probably less-obvious problems down the line. I wanted to recommend a firmware update, but the file bootfw.zip is missing in the directory for the newer firmware releases (e.g. q2e18 for build 767): http://wiki.laptop.org/go/Upgrading_firmware#Steps_to_upgrade_firmware It sounds like you are not using 767, or have customized it somehow. Official 767 already has q2e18 as /boot/bootfw.zip and if you boot with AC connected it will upgrade you to q2e18. Could you give the URL to the build that you are using? Daniel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
XO boot problem
Hi, An other school in Cambodia has the problem that several XOs don't boot anymore. Some of the XOs have build 708 and other ones build 767 installed. All are in secure mode. With a dignostic startup the following information is last shown on the screen: OLPC C2, 256 MiB memory installed, S/N CSN75001163 OpenFirmware CL1 Q2D16 Q2D Nothing happens anymore afterwards. The OFW hardware diagnostic is still working. After a clean install the XO works fine again but all the data is lost. Has anyone a solution for that problem or input for further diagnosis? I wanted to recommend a firmware update, but the file bootfw.zip is missing in the directory for the newer firmware releases (e.g. q2e18 for build 767): http://wiki.laptop.org/go/Upgrading_firmware#Steps_to_upgrade_firmware Regards, Philipp Pepyride School Cambodia Original Message Subject: Re: XO boot problem Date: Mon, 09 Mar 2009 11:11:07 +0700 From: Channa cha...@cambodiapride.org To: Philipp Kocher philipp.koc...@gmx.net References: 49aded40.5050...@gmx.net 49adfbad.8020...@cambodiapride.org 49adff27.8070...@gmx.net Dear Philipp, I just got one more XO from the 8th grader that have problem with booting up, after I did the same as you mention (press the check button, the right one of the four buttons above the power button) on the white screen has this massage, OLPC C2, 256 MiB memory installed, S/N CSN75001163 OpenFirmware CL1 Q2D16 Q2D . And nothing happen after that. Best regards, Channa Philipp Kocher wrote: Could you try to press the check button (the right one of the four buttons above the power button) when turning on the XO? See this website: http://wiki.laptop.org/go/Startup_Diagnosis#Check-Key_Boot You should see more information when booting. What are the last lines? Regards, Philipp Channa wrote: Dear Philipp, Thank you very much for trying to help. Yes, it's about 7 computers are from JHS and they have this problem, and these computers for 6th grader when you were here, but right now they are in 7th grader, and they are using build 708. And another 3 computers using by 8th grader with build 767, this build installed by Elijah at the beginning of the school year, he is a computer teacher there. And these problem we met last month but in different time. So as I told you I have no solution, even I tried to ran the hardware test the result everything is okay, but when I re-boot it again the computer play sound the same as normal (the sound when the XO start) but after that very soon it changed quickly to white screen and the XO in the meddle of the screen and nothing happen even we wait about 1 or 2 hours it still the same. Right now I had erased everything and put the old build 708 back for them even we don't know what problem is and I'm worry that it will be more computers have the same problem like this and I don't want to erase the student's project from their XO, if you can help with this problem it will be helpful. Again thank you for your help, Best regards, Channa Philipp Kocher wrote: Hi Channa I can try to help you with your XO boot problem if you give me some more information. Please give me a detailed description of the problem. Here are some questions, but if you have more information which might be relevant please add it. What is the build number? How many XOs are affected? When did it start? When did you install the new build? Brake all XOs at the same time? What do you see on the screen when the boot process stops? Can you do the hardware test? Are new XOs from the JHS affected as well? Regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Journal integration for Scratch
You are right. It doesn't work like that, but the filename is quite important to me. It is shown in the Scratch GUI and it is an important marker to find the project, when save and not save as is used. I wouldn't just take the object_id. What do you think John? There is a bug in Scratch version 12. The symbolic link of the Project directory doesn't get created (Open Projects shows Scratch.activity folder instead). I checked the scripts (scratch-activity and scratch-wrapper) but couldn't find where the link should get created. Regards, Philipp Bert Freudenberg wrote: The script looks good, except for the name mangling magic (which is a bit hard to understand because of mis-indentations). This wouldn't even work with your XO's language set to non-English (which the majority of XOs use). I would simply name the file $object_id.sb. - Bert - On 14.01.2009, at 07:04, Philipp Kocher wrote: Hi John Yes, we need the mimetypes.xml file as well (thanks Tomeu I forgot the USB flash drive use case). I have tested the attached mimetypes.xml. It is working fine. Put it in the activity directory. Furthermore we have to change the scratch-activity script, so the parameter with the scratch project object-id gets converted (copy-from-journal) in a file and passed on to scratch. See the attached scratch-activity script. I am not an expert with bash scripts, so please give feedback. I would like to extend the script so project files in the journal directory are copied back to the journal after exiting scratch, but for opening project it should work fine. Best regards, Philipp John Maloney wrote: Hi, Phillip. Thanks for all your hard work in tracking this down. I had looked at several other packages, including EToys, and couldn't figure out from them how to do this. I will make these changes to the next XO Scratch bundle. Is that all I need to do? What about the mime types XML file similar to the one added by Etoys? Does that turn out to be unnecessary? -- John On Jan 13, 2009, at 12:55 AM, Philipp Kocher wrote: Tomeu Vizoso wrote: On Mon, Jan 12, 2009 at 18:50, Bert Freudenberg b...@freudenbergs.de wrote: On 12.01.2009, at 18:11, Tomeu Vizoso wrote: So what would the Scratch activity have to do so files put into the Journal (maybe by downloading) are displayed using a Scratch icon rather than the generic document icon? Shipping a mimetypes.xml file inside the bundle as explained here: http://wiki.laptop.org/go/Activity_bundles#Bundle_Structure Sugar will call update-mime-database and will merge that file into the xdg mime database. I think that John is already trying this. Guess I'm confused then - I thought that's exactly what Philipp had done. I think he just changed the mime_types field in the .info file. And I just checked and it does work with Etoys projects. When downloading one it indeed gets an etoys icon (although at a smaller size - why is that?) No idea, though I think that the mime database is updated in the etoys rpm and not in the bundle, am I right? Regards, Tomeu Thanks Tomeu to lead me to the /home/olpc/.local directory. However, the mimetypes.xml is not necessary to get the icon in the journal. I just had to copy the scratch icon file in the activity directory to application-x-scratch-project.svg (also in the scratch activity dirctory). The Memorize Activity is a good example for using that feature. Sugar has to be restarted after installing Scratch to show the icon. John, could you please make the following changes in the next Scratch version: - add the line mime_types = application/x-scratch-project to the activity.info file - copy the scratch icon to application-x-scratch-project.svg in the activity directory Etoys gets configured by different packages. e.g. the rpm etoys-3.0.2153-1.noarch is adding the file /usr/share/mime/packges/etoys.xml and the rpm sugar-artwork-0.82.3-1.olpc3 is adding the file /usr/share/icons/sugar/scalable/mimetypes/application-x-squake-project.svg. Regards, Philipp ?xml version=1.0 encoding=UTF-8? mime-info xmlns=http://www.freedesktop.org/standards/shared-mime-info; mime-type type=application/x-scratch-project commentScratch Project/comment glob pattern=*.sb/ /mime-type /mime-info #!/bin/sh # Author: Bert Freudenberg # Modified by: John Maloney # Purpose: Run Scratch using the Squeak virtual machine echo scratch-activity echo $@ echo $0 $@ echo # arguments are unordered, have to loop args= while [ -n $2 ] ; do case $1 in -b | --bundle-id) bundle_id=$2 ; args=$args BUNDLE_ID $2 ;; -a | --activity-id) activity_id=$2 ; args=$args ACTIVITY_ID $2;; -o | --object-id) object_id=$2 ; args=$args OBJECT_ID $2;; -u | --uri) uri=$2 ; args=$args URI $2;; *) echo unknown argument $1 $2 ;; esac shift;shift done # really need bundle id
Re: Adding Activities installed to the Favorites view
The file /usr/share/sugar/data/activites.defaults defines which activities are marked as favorite during installation. I didn't test it, but the comment says so. Regards, Philipp shivaprasad javali wrote: What if it is installed by running the sugar-install-bundle from a shell script. My application has to do some things like add a .modules file so that the snd-pcm-oss module which my application needs to play sound. So I have a shell script installing the activity using sugar-install-bundle and then setting up other things for the activity. In this case would the activity be added to the Favorites list? Thanks jbsp72 On Thu, Jan 15, 2009 at 5:06 PM, Bert Freudenberg b...@freudenbergs.de mailto:b...@freudenbergs.de wrote: On 15.01.2009, at 12:27, shivaprasad javali wrote: Hi, I have an activity running on the XO. I created the .xo package and it installs properly from the .xo file by running the sugar- install-bundle command. I wanted to know whether after installing the activity I can automatically add my activity to the favorites list so that it shows up in the Favorites view? No. If so how can I do it? Users typically install a bundle from the Journal. If they do so, I think it becomes a favorite automatically. - Bert - ___ Devel mailing list Devel@lists.laptop.org mailto:Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Journal integration for Scratch
Hi John Yes, we need the mimetypes.xml file as well (thanks Tomeu I forgot the USB flash drive use case). I have tested the attached mimetypes.xml. It is working fine. Put it in the activity directory. Furthermore we have to change the scratch-activity script, so the parameter with the scratch project object-id gets converted (copy-from-journal) in a file and passed on to scratch. See the attached scratch-activity script. I am not an expert with bash scripts, so please give feedback. I would like to extend the script so project files in the journal directory are copied back to the journal after exiting scratch, but for opening project it should work fine. Best regards, Philipp John Maloney wrote: Hi, Phillip. Thanks for all your hard work in tracking this down. I had looked at several other packages, including EToys, and couldn't figure out from them how to do this. I will make these changes to the next XO Scratch bundle. Is that all I need to do? What about the mime types XML file similar to the one added by Etoys? Does that turn out to be unnecessary? -- John On Jan 13, 2009, at 12:55 AM, Philipp Kocher wrote: Tomeu Vizoso wrote: On Mon, Jan 12, 2009 at 18:50, Bert Freudenberg b...@freudenbergs.de wrote: On 12.01.2009, at 18:11, Tomeu Vizoso wrote: So what would the Scratch activity have to do so files put into the Journal (maybe by downloading) are displayed using a Scratch icon rather than the generic document icon? Shipping a mimetypes.xml file inside the bundle as explained here: http://wiki.laptop.org/go/Activity_bundles#Bundle_Structure Sugar will call update-mime-database and will merge that file into the xdg mime database. I think that John is already trying this. Guess I'm confused then - I thought that's exactly what Philipp had done. I think he just changed the mime_types field in the .info file. And I just checked and it does work with Etoys projects. When downloading one it indeed gets an etoys icon (although at a smaller size - why is that?) No idea, though I think that the mime database is updated in the etoys rpm and not in the bundle, am I right? Regards, Tomeu Thanks Tomeu to lead me to the /home/olpc/.local directory. However, the mimetypes.xml is not necessary to get the icon in the journal. I just had to copy the scratch icon file in the activity directory to application-x-scratch-project.svg (also in the scratch activity dirctory). The Memorize Activity is a good example for using that feature. Sugar has to be restarted after installing Scratch to show the icon. John, could you please make the following changes in the next Scratch version: - add the line mime_types = application/x-scratch-project to the activity.info file - copy the scratch icon to application-x-scratch-project.svg in the activity directory Etoys gets configured by different packages. e.g. the rpm etoys-3.0.2153-1.noarch is adding the file /usr/share/mime/packges/etoys.xml and the rpm sugar-artwork-0.82.3-1.olpc3 is adding the file /usr/share/icons/sugar/scalable/mimetypes/application-x-squake-project.svg. Regards, Philipp ?xml version=1.0 encoding=UTF-8? mime-info xmlns=http://www.freedesktop.org/standards/shared-mime-info; mime-type type=application/x-scratch-project commentScratch Project/comment glob pattern=*.sb/ /mime-type /mime-info #!/bin/sh # Author: Bert Freudenberg # Modified by: John Maloney # Purpose: Run Scratch using the Squeak virtual machine echo scratch-activity echo $@ echo $0 $@ echo # arguments are unordered, have to loop args= while [ -n $2 ] ; do case $1 in -b | --bundle-id) bundle_id=$2 ; args=$args BUNDLE_ID $2 ;; -a | --activity-id) activity_id=$2 ; args=$args ACTIVITY_ID $2;; -o | --object-id) object_id=$2 ; args=$args OBJECT_ID $2;; -u | --uri) uri=$2 ; args=$args URI $2;; *) echo unknown argument $1 $2 ;; esac shift;shift done # really need bundle id and activity id if [ -z $bundle_id -o -z $activity_id ] ; then echo ERROR: bundle-id and activity-id arguments required echo Aborting exit 1 fi # some debug output echo launching $bundle_id instance $activity_id [ -n $object_id ] echo with journal obj $object_id [ -n $uri ] echo loading uri $uri echo # do not crash on dbus errors export DBUS_FATAL_WARNINGS=0 if [ -n $object_id ] ; then JOURNAL_DIR=$SUGAR_ACTIVITY_ROOT/data/Journal mkdir -p $JOURNAL_DIR temp_filename=$JOURNAL_DIR/temp.sb title=`copy-from-journal -o $object_id -m $temp_filename | grep title ` # title is something like this for files downloaded from server: # title - File do_math_3.sb from http://schoolserver/Scratch/do_math_3.sb. # or like this if copied from USB flash drive: # title - do_math_3 title=${title#*title - } #cut off description echo title: $title # workaround for copy-from-journal bug
Re: Journal integration for Scratch
Tomeu Vizoso wrote: On Thu, Jan 8, 2009 at 04:50, Philipp Kocher philipp.koc...@gmx.net wrote: Bert Freudenberg wrote: On 18.12.2008, at 08:08, Philipp Kocher wrote: One more thing, the scratch icon is not shown in the journal for files with the scratch mimetype. I think the file /usr/share/sugar/data/mime.defaults has to be adapted to include the scratch-mimetype. It just has to be listed in the activity bundle's info file: http://wiki.laptop.org/go/Activity_bundles#.info_File_Format - Bert - I added the mime_types attribute to the activities.info file and the icon attribute is set as well. But still the Scratch icon is not shown in the Journal (the default octet-stream icon is shown) even so the Scratch mime-type is set in the metadata file in the datastore. I think the problem is connected to the gtk theme (gtk-update-icon-cache and update-mime-database). e.g. etoys has file etoys.xml in /usr/share/mime/packages and probably the icon in the icon cache. How can I put the icon in the icon-cache? Hi, Sugar will put it there for you when the .xo bundle is installed. That means that if the activity bundle gets installed from outside Sugar, the mime db won't be updated. So, I would recommend you to uninstall Scratch from Sugar, then installing the .xo bundle by downloading it with Browse or by copying it into the journal from an usb stick. HTH, Tomeu Thanks for the input, but I wasn't successful. I tried the following: 1. Extracted the files of Scratch-12.xo 2. Added the line mime_types = application/x-scratch-project to the activity.info file 2. Created a new archive file Scratch-12_mime.xo with the change 3. Erased activity Scratch on the XO 4. Copied the file Scratch-12_mime.xo to the Journal 5. Started/Installed Scratch-12_mime.xo 6. Copied Scratch project to the Journal with copy-to-journal test.sb -m 'application/x-scratch-project' -t test.sb test.sb still has the standard icon and not the Scratch cat icon in the Journal. Which activity is using the mime db update feature? I would expect a new timestamp for the file /usr/share/mime/mime.cache after installing the activity. Can I execute the mime db update on the command line? Regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Journal integration for Scratch
Tomeu Vizoso wrote: On Mon, Jan 12, 2009 at 18:50, Bert Freudenberg b...@freudenbergs.de wrote: On 12.01.2009, at 18:11, Tomeu Vizoso wrote: So what would the Scratch activity have to do so files put into the Journal (maybe by downloading) are displayed using a Scratch icon rather than the generic document icon? Shipping a mimetypes.xml file inside the bundle as explained here: http://wiki.laptop.org/go/Activity_bundles#Bundle_Structure Sugar will call update-mime-database and will merge that file into the xdg mime database. I think that John is already trying this. Guess I'm confused then - I thought that's exactly what Philipp had done. I think he just changed the mime_types field in the .info file. And I just checked and it does work with Etoys projects. When downloading one it indeed gets an etoys icon (although at a smaller size - why is that?) No idea, though I think that the mime database is updated in the etoys rpm and not in the bundle, am I right? Regards, Tomeu Thanks Tomeu to lead me to the /home/olpc/.local directory. However, the mimetypes.xml is not necessary to get the icon in the journal. I just had to copy the scratch icon file in the activity directory to application-x-scratch-project.svg (also in the scratch activity dirctory). The Memorize Activity is a good example for using that feature. Sugar has to be restarted after installing Scratch to show the icon. John, could you please make the following changes in the next Scratch version: - add the line mime_types = application/x-scratch-project to the activity.info file - copy the scratch icon to application-x-scratch-project.svg in the activity directory Etoys gets configured by different packages. e.g. the rpm etoys-3.0.2153-1.noarch is adding the file /usr/share/mime/packges/etoys.xml and the rpm sugar-artwork-0.82.3-1.olpc3 is adding the file /usr/share/icons/sugar/scalable/mimetypes/application-x-squake-project.svg. Regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Journal integration for Scratch
Bert Freudenberg wrote: On 18.12.2008, at 08:08, Philipp Kocher wrote: One more thing, the scratch icon is not shown in the journal for files with the scratch mimetype. I think the file /usr/share/sugar/data/mime.defaults has to be adapted to include the scratch-mimetype. It just has to be listed in the activity bundle's info file: http://wiki.laptop.org/go/Activity_bundles#.info_File_Format - Bert - I added the mime_types attribute to the activities.info file and the icon attribute is set as well. But still the Scratch icon is not shown in the Journal (the default octet-stream icon is shown) even so the Scratch mime-type is set in the metadata file in the datastore. I think the problem is connected to the gtk theme (gtk-update-icon-cache and update-mime-database). e.g. etoys has file etoys.xml in /usr/share/mime/packages and probably the icon in the icon cache. How can I put the icon in the icon-cache? Regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: XOs with no sound
Happy New Year. We don't use the Measure Activity. Here are the most frequently used Activities using sound: - Scratch version 11 (with resume sound problem, ticket #6201) - Record version 59 - Browse version 98 with Adobe flash plugin version 10.0.12.36 (gnash deinstalled) for a flash based English learning program - Gcompris bundle Version 10 - Speak version 9 Recording with Scratch works with No sound XOs even so Capture volume is set to 0. I will keep an eye on the alsamixer when I use these activities. Regards, Philipp James Cameron wrote: On Wed, Dec 31, 2008 at 03:52:05PM +0700, Philipp Kocher wrote: Alsa keeps the values in memory and writes it into the /etc/alsa/asound.state file during shutdown. The file has a new timestamp, so someone is writing into it at least. Okay, that must be a build 767 thing. Recent development builds use /etc/asound.state only. I've checked only the development builds at this stage. Master Mono Playback Switch: is false should be true (line 50) Master Mono Playback Volume: is 0 should be 28 (line 61) These two should have no effect. I've tested that they have no effect on audio playback. The method I used was to temporarily install the OSS module, and run a background process writing noise to the output. Thus: modprobe snd-pcm-oss dd if=/dev/urandom of=/dev/dsp While this is running I then manipulated the controls using alsamixer. The Master Mono Playback controls did nothing. (Incidentally, the volume control keys on the keyboard changed the Master control only, not the Master Mono control, and not the PCM control.) PCM Playback Switch: is false:false should be true:true (line 178) In false:false state, this switch prevents all sound output from activities and applications. The noise test above fell silent. PCM Playback Volume: is 0:0 should be 22:22 (line 190) In 0:0 state, the audio is less loud, but not eliminated. The noise test continued to generate audio, but I needed to set the Master control (not the Master Mono control) to at least 50%. Capture Volume: is 0:0 should be 15:15 (line 287) In this state, the noise test audio is unchanged. This would affect sound capture using microphone though. I hope that helps. Yes, it does. It shows the immediate cause of the problem was that the PCM Playback Switch was turned off. That the Capture control was also changed is interesting. I've searched the installed activities on a development build here for references to the amixer command. The only activity that I've found it used in is Measure. Measure.activity/toolbar_side.py ... changes the Capture control. Measure.activity/audiograb.py ... changes the PCM Playback Switch. Is Measure being used? Can you reproduce the symptom on a working XO by asking for a shutdown while Measure is running? What version of Measure is being used? Version 20 of Measure attempts to restore PCM to 70 on quit. Does the symptom clear if Measure is started and then quit? ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: XOs with no sound
Alsa keeps the values in memory and writes it into the /etc/alsa/asound.state file during shutdown. The file has a new timestamp, so someone is writing into it at least. Sorry my master asound.state file was working but not standard. I have now 5 values that are different between a standard XO (build 767) and a no sound XO Master Mono Playback Switch: is false should be true (line 50) Master Mono Playback Volume: is 0 should be 28 (line 61) PCM Playback Switch: is false:false should be true:true (line 178) PCM Playback Volume: is 0:0 should be 22:22 (line 190) Capture Volume: is 0:0 should be 15:15 (line 287) I hope that helps. Regards, Philipp James Cameron wrote: On Wed, Dec 31, 2008 at 09:22:17AM +0700, Philipp Kocher wrote: It seems like always the same 7 values are wrong. Which 7 values? 1. Copy /etc/alsa/asound.state of a healthy XO to USB flash drive Okay, so it is in /etc/alsa on those builds? Are you sure that file is in use? On the build I'm using, there is a file in /etc/alsa/asound.state that is not updated, as well as one in /etc/asound.state . (I would have thought /var would have been more appropriate). Your process has two steps and requires a working XO. I think it is even simpler to alsactl -f /dev/null restore ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
XOs with no sound
Hi The sound of 5 of our 100 XOs doesn't work anymore. The hardware test is okay (sound works), but all the sugar activities I tested (Scratch, TamTamMini, Speak, Gcompris) don't have sound. Rebooting the XO doesn't help. I checked the sugar log files and /var/log/messages, but couldn't find any sound related warnings or errors. We are running build 767, but I have seen the same problem with build 708 (but not that often). Reinstalling the OS solves the problem, but I would prefer an easier solution. I checked if such a bug is reported, but couldn't find a ticket (the sound resume problem of ticket 6201 is normally solved with a reboot). Since I don't know how to reproduce the problem, I would like to localize it before opening a ticket. What can I do to localize the problem (e.g. low level sound tests)? Is it possible that running out of battery while playing sound can have such an effect or could it be related to the resume problem of ticket 6201 (we had that problem very often with Scratch when the experimental power management was switched on )? Regards, Philipp Pepyride School Cambodia ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: XOs with no sound
What is the ticket number for that problem? It seems like always the same 7 values are wrong. There is a shorter solution: 1. Copy /etc/alsa/asound.state of a healthy XO to USB flash drive 2. Type alsactl -f /media/{flash_dirve_name}/asound.state restore on the XO with no sound Thanks qu...@laptop.org wrote: How to fix no sound caused by operating system. 1. obtain the root prompt, e.g. by starting the Terminal activity and clicking on become root button, 2. if you wish to find out in which way the settings have been corrupted, copy the file /etc/asound.state before proceeding, cp /etc/asound.state /home/olpc/asound.state.orig 3. obtain a copy of /etc/asound.state from a working XO, or from a reinstalled XO, and place it in /etc/asound.state on the failed XO, 4. restore the settings from the file, alsactl restore 5. test that sound now works. Note: there is a possibility that the build 767 ALSA saved state file is in some other place. I've not checked. I found out where the file was on Joyride 2612 using a command: strace -e open alsactl restore ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Journal integration for Scratch
Hi John Sorry for the late response. I think to increase the font size in the file dialog is a good idea. As for the thumbnails and project notes, for us an easy way to open and save the projects is more important than to see a thumbnail and project notes (the filename and the date when the project was saved is enough information for us). If the examples and the own projects would be separated (e.g. a button examples) would help as well. It is quite confusing for the students that they can not save their projects in some folders (folder symbols of own folders and example folders look the same, but no write permission for the example folders). TurtleArt has such a solution. Scratch is the favourite Activity at our school, even so it is quite hard for the students to drag and drop the small command icons on the XO with the jumping mouse cursor problem. I am aware that these are all just XO problems and you have to maintain other platforms as well. Thanks for your great support for Scratch on the XO. Thanks, Philipp Pepyride School Cambodia John Maloney wrote: Hi, Phillip. Re: Do you plan a journal integration for scratch? Probably not in the near future. There has been talk about making an API for the Journal that looks more like a file system to application programs. That might be the easiest way to integrate the Journal into Scratch in the long run. Sugar continues to evolve. Earlier versions still allowed access to the file system in a way that made it fairly easy to port applications like Scratch. More recently, with the Rainbow security system, it became much more difficult to use the file system directly. I support Scratch on many different platforms. The XO is an important one due to the educational mission of OLPC. Still, my time is limited and I can only spend so much of it on the XO version of Scratch. Thus, I try to steer a middle path -- create a Scratch port for the XO without changing too much of the Scratch source code. I am hoping that eventually Sugar will make life easier for those porting applications from file-based platforms by providing some sort of virtual file system API. The Journal and the virtual file system could just be two views on the same set of files. Re: At the moment it is not possible to delete scratch projects easily (just in terminal) and our students have difficulty to understand the file and folder structure in the dialog with the very small font. Yes, I see the problem. Your solution sounds like it would work, but the downside is that browsing for existing Scratch projects would be done using the Journal, rather than Scratch's open dialog. That means the user would not see the project thumbnail and project notes. If project deletion is the only issue, my preference would be to add a way to delete projects to the Scratch open and save dialogs. (Although I'm not promising to do that immediately, since we're currently working on the release of Scratch 1.4.) Another solution (which could be more near-term) would be to increase the font size in the file dialog. Do you think that would help? -- John ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Downloading Scratch project to XO
Hi Bert, John There is a bug in copy-from-journal, it is adding an additional dot before the file extension. Otherwise it is working. [o...@localhost ~]$ copy-from-journal -o 07474cf4-4883-4ded-a994-ab5511cfc29c /tmp/test.sb /home/olpc/.sugar/default/data/07474cf4-4883-4ded-a994-ab5511cfc29c - /tmp/test..sb My workaround in scratch-activity looks like this: if [ -n $object_id ] ; then filename=$SUGAR_ACTIVITY_ROOT/instance/temp.sb copy-from-journal -o $object_id $filename filename=$SUGAR_ACTIVITY_ROOT/instance/temp..sb else filename= fi # run Squeak VM with Scratch image exec /usr/bin/squeak \ -vm-display-X11 \ -swapbtn \ -sugarBundleId $bundle_id \ -sugarActivityId $activity_id \ ScratchXO.image \ $filename Philipp Bert Freudenberg wrote: The simplest would be something like if [ -n $object_id ] ; then filename=$SUGAR_ACTIVITY_ROOT/instance/temp.sb copy-from-journal -o $object_id $filename #... append $filename to Scratch command line ... fi (assuming the Scratch wrapper still basically looks like the Etoys one) - Bert - On 17.12.2008, at 00:51, John Maloney wrote: Hi, Bert. Thanks for the help on this. To clarify, what I was doing was using the clipboard to move a downloaded Scratch project file. I dragged it from the Journal to the clipboard, then went to the Scratch activity and dropped it onto the Scratch window. So that's a somewhat different path from trying to open the project directly in the Journal. It would be great to get both paths working eventually. Re: But this retrieval could be done in the Scratch wrapper script. Cool! That would be an easy solution for me if the wrapper script is not too complex. Could you give me a hint about what the wrapper script would look like? Meanwhile, I will try to make the drag-n-drop-from-clipboard solution work. -- John On Dec 16, 2008, at 6:35 PM, Bert Freudenberg wrote: Not quite, Sugar will not actually pass the file name of the Journal entry when launching the activity. Instead, it passes the id of a datastore object, and the activity is supposed to retrieve that from the datastore. But this retrieval could be done in the Scratch wrapper script. - Bert - On 17.12.2008, at 00:35, John Maloney wrote: Hi, Bert. Re: does Scratch accept a .sb file on its command line? Yes, it does. The problem is that the journal is changing the file extension to something like .bin, and Scratch doesn't think a .bin file is a Scratch project file and simply ignores it. I believe the issue is just that we need one extra file in the Scratch activity info to tells the Journal that Scratch handles the file extensions .sb and .sprite. I figured out what that file should have in it a few weeks back but haven't yet had a chance to try it. I'll give it a try and, if it works, I'll release a new version of Scratch on the XO that includes that file. -- John On Dec 15, 2008, at 2:46 PM, Bert Freudenberg wrote: John, does Scratch accept a .sb file on its command line? If so, the launcher script could get the file from the Journal and pass it on. - Bert - On 15.12.2008, at 18:53, John Maloney wrote: Hi, Phillipp. Thanks for reporting this problem. I believe there is a way to tell the XO to associate the .sb file extension with Scratch. I will look into that and let you know if I figure it out. -- John On Dec 14, 2008, at 8:03 PM, Philipp Kocher wrote: Hi I would like to download Scratch projects from a local server to the XO. On the server I added the following line to the file /etc/mime.types: application/scratch sb The apache server is now sending files with sb-extension with mime type application/scratch. On the XO the mime type gets stored in the datastore metadata-file. After adding the following line to the Scratch activity/ activity.info file, Scratch gets started when clicking on the Scratch project in the Journal: mime_types = application/scratch The problem is that the project doesn't get opened. The scratch start script bin/scratch-activity gets called with the -u argument holding a datastore object ID, but the script doesn't handle the -u argument. How can I convert a datastore object ID to a filename, so scratch can open the project? And how do I get the necessary permissions to access the file? Thanks, Philipp Pepyride School Cambodia ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Journal integration for Scratch
Hi John Do you plan a journal integration for scratch? At the moment it is not possible to delete scratch projects easily (just in terminal) and our students have difficulty to understand the file and folder structure in the dialog with the very small font. If you don't want to change the core application, there might be a workaround. 1. create a directory projects/journal 2. if scratch gets opened without a datastore reference, a default project (e.g. scratch_project) gets copied to projects/journal and opened. 3. if scratch gets opened with a datastore reference, the files gets copied (copy-from-journal) to the projects/journal directory and opened. 4. the name of the default project still has to be changed with save as 5. after quit the files in the directory projects/journal get copied to the journal (copy-to-journal) and deleted in projects/journal The scratch projects could be erased in the journal. What do you think? One more thing, the scratch icon is not shown in the journal for files with the scratch mimetype. I think the file /usr/share/sugar/data/mime.defaults has to be adapted to include the scratch-mimetype. Best regards, Philipp ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Downloading Scratch project to XO
Hi I would like to download Scratch projects from a local server to the XO. On the server I added the following line to the file /etc/mime.types: application/scratch sb The apache server is now sending files with sb-extension with mime type application/scratch. On the XO the mime type gets stored in the datastore metadata-file. After adding the following line to the Scratch activity/activity.info file, Scratch gets started when clicking on the Scratch project in the Journal: mime_types = application/scratch The problem is that the project doesn't get opened. The scratch start script bin/scratch-activity gets called with the -u argument holding a datastore object ID, but the script doesn't handle the -u argument. How can I convert a datastore object ID to a filename, so scratch can open the project? And how do I get the necessary permissions to access the file? Thanks, Philipp Pepyride School Cambodia ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel