martedì 23 marzo 2010

Mono 2.4.3 and WinForm on Maemo device

Today I spend some time to make some test using a real winform application on my N810 device. This application use a config file, a socket and a nontrivial winform interface to show the status of specific software server. This interface use tab pane dock to the full window, a detaililed list, and change the color of the row when a specific process is in running. I simply copy the binary from the windows server to my OpenSuSE linux machine and on my N810 maemo device. On OpenSuSE I have no problem with the latest version of mono. On Maemo device I not able to run the release version of application, so I try to run the Debug version with the "--debug" option. Now the application start perfectly. Here there is some screenshot taken from Windows, OpenSuSE and N810 :)
Window Platform
Linux Plaform
Maemo4 on N810

sabato 13 marzo 2010

Mono 2.4.3 on Maemo devices

After long long time I find some freetime to spend to update mono for maemo devices. After a lots of work, at the end I able to compile mono 2.4.3 for the maemo devices. Here you can find the instaction to compile mono for maemo. This instruction are refered by Maemo5 but work also on maemo4 and maemo4.1. I test it only on maemo4.1 device (I have N810 device but unfortunally not a N900 one). Here a the output of "mono --version" from a terminal:
Nokia-N810-23-14:~# mono --version
Mono JIT compiler version 2.4.3 (tarball Sat Feb 27 22:09:03 CET 2010)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
    TLS:           normal
    GC:            Included Boehm (with typed GC)
    SIGSEGV:       normal
    Notifications: epoll
    Architecture:  armel,soft-float
    Disabled:      debug,large_code,logging,com

sabato 4 luglio 2009

FsGateway - access to Sugar Datastore

FsGateway is a Mono application that allows to mount several entities as a filesystem using mono-fuse. Now we see the sugar_datastore module.

sugar_datastore module

This module allows mounting a Sugar Datastore storage as a filesystem. This way you can access to your document created using Sugar. Tags are shown as directories in the exported filesystem. You can open a Write document by simply double-clicking on it, and Open Office will be opened.

To do this, simply run the application specifying the filesystem type (sugar_datastore), the location where your data is stored (in this case datastore_sample) and the mountpoint (in this case mountpoint/):

mono --debug fsgateway.exe sugar_datastore datastore_sample mountpoint/

Now you can use your preferred file manager such as Nautilus or Dolphin to see the content and open each object with a double-click:

Here some snapshopt:




Since the datastore is read scanning the storage directory without using the datastore internal storage capability, data is read-only. This is done by the module, changing this behavior is very easy.

Obviously, you can open a SoaS datastore using this step:

  • become root (unfortunately)
  • plug in your SoaS in the USB port
  • create a working directory (e.g.: //mkdir ~/soas_datastore//)
  • mount the home partition with loop option (e.g.: //mount -o loop /media/disk/LiveOS/home.img soas_datastore// )
  • mount the datastore stored inside it (e.s. //mono --debug fsgateway.exe sugar_datastore ~/soas_datastore/liveuser/.sugar/default/datastore mountpoint//)

Of course, you can try the "allow_other" FUSE option to allow other users to access to the datastore.

lunedì 15 giugno 2009

FsGateway: looking inside an XML file as a filesystem.

FsGateway is a Mono application that allow to mount several entity as a filesystem. To do this one mono-fuse is used. Actually when you need to start the fsgateway you need do specify the filesystem type and the mountpoint. Now will describe the use of xmlfs "module". This module allow to mount a XML file into the normal filesystem. To do this simply run the application specify filesystem type (xmlfs), an XML file (in this case ~/mono_sugar/xml/xml/xml/bin/Debug/test3.xml) and the mountpoint (in this case mountpoint/):
mono fsgateway.exe xmlfs ~/mono_sugar/xml/xml/xml/bin/Debug/test3.xml mountpoint/
Now you can use your preferred file manager like nautilus or dolphin to see the content and open each node like a file: If you run the "find" or "grep" utilities, the file name that you get contains the XPath query to access the node. For example:
find mountpoint -iname "*md5*"
give this result for the file that I specify:
mountpoint/def:metadigit/def:img[1]/def:md5 mountpoint/def:metadigit/def:img[1]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[1]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[2]/def:md5 mountpoint/def:metadigit/def:img[2]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[2]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[3]/def:md5 mountpoint/def:metadigit/def:img[3]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[3]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[4]/def:md5 mountpoint/def:metadigit/def:img[4]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[4]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[5]/def:md5 mountpoint/def:metadigit/def:img[5]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[5]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[6]/def:md5 mountpoint/def:metadigit/def:img[6]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[6]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[7]/def:md5 mountpoint/def:metadigit/def:img[7]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[7]/def:altimg[2]/def:md5 mountpoint/def:metadigit/def:img[8]/def:md5 mountpoint/def:metadigit/def:img[8]/def:altimg[1]/def:md5 mountpoint/def:metadigit/def:img[8]/def:altimg[2]/def:md5
The same way, if you run "grep" you get the same behavior. For example:
grep -ril piccolo mountpoint/
gives as result:
mountpoint/def:metadigit/def:bib/dc:description/text()
You can find the source code here. Note: the def prefix is automatically added by the module for the default namespace. If this prefix is already used, the module use def2, or def3 ... and so on.

venerdì 5 dicembre 2008

OLPC under the Tower Eiffel - video, slide and pictures from the event

The French guys have published a lots of material from the CodeCamp on OLPC. Here you can find a lots of material about this event including some pictures and my presentation about to use the XO datastore from Mono and C#.

mercoledì 12 novembre 2008

OLPC and MONO under the Eiffel Tower

Hi guys, OLPC France will organize a OLPC CodeCamp in Paris on November 15 th. Five workshops are planned: Sugar, Localization, Pedagogic Usage, School Server and… Development of new activities using Mono. OLPC is one of most ambitious education project, it’s cool to have opportunity to use Mono on it. I will join with this guys, and you? You can find here some useful link:here and here. This news is also published by olpcnews. You can find the full article here. Best Regards.

mercoledì 29 ottobre 2008

Mono on OLPC (One Laptop Per Child) device update

Hi guys, A new official version of the XO Operating System is came out some days ago, the 767 build. Unfortunally the mono activities doesn't work on this environment. After some work to understanding the problem (because if I try to run it from Terminal activity using sugar-launch it came up) the bug is now fixed. The problem was related to the rainbow security model implemented on XO. This version of rainbow do not create the standard input and output file handles so the application hang-up. To fix it you need to modify the script that launch the activity to add a redirection from and to /dev/null. After this you have your activity ready to run again. Here you can see the wiki page on laptop.org with the script updated. Happy hacking