Hack Week: Moonlight Desklets.

The folks over at #desklets have been making some progress on their hack for week.

Andreia wrote an SVG to XAML conversion tool that is very handy to import artwork from tools like Inkscape into XAML.

Everaldo did a screencast of a few desklets that the folks have been working on during Hack Week:

YouTube Video:

Gtk#/Moonlight Desklets in action

Some screenshots, because they look nicer than the YouTube video:

Screenshot

These are of course not as advanced as other desklets systems, this was written only in a couple of days, but we have a few interesting things in them that we think are interesting concepts in general:

  • A new launch tool called "mopen" that can launch either XAML files directly, or can launch applications that are contained in a directory (directory/default.xaml, directory/default.exe and eventually directory/default.XX where XX is an extension for a scripting language supported by Mono: Boo, IronPython, Javascript, etc).
  • mopen can launch multiple applications into the same Mono virtual machine and isolate each desklet from each other using Application Domains. This feature is important to us because it means that only one Mono Virtual Machine, Gtk# and Moonlight are loaded at a given time to run multiple applications at the same time.
    The way we did this was by adding a "--host" command line option. You can instruct your desklets (or in fact any program that can be opened with mopen) to go into a specific container. You would for example load all your stable desklets into one VM:
    	$ mopen --host desklets clock
    	$ mopen --host desklets calendar
    	$ mopen --host desklets flickr
    	$ mopen --host desklets picasa
    		

    But keep your development desklets into a separate VM to prevent bringing everything down:
    	$ mopen --host devel stockapplet
    		
  • Security System: today deskltes run without a security sandbox. We will be working on the Silverlight security system for Mono. Once that is implemented users will be able to run untrusted code into the sandboxed environment.
    The new Silverlight security system is a lot easier to understand than the old CAS, so we are looking forward to implement this (it is also a requirement for the Moonlight browser plugin).
  • Mono: we get to leverage our favorite CLI-based languages (C#, Boo, IronPython, Nemerle or any other language that targets the CLI) and we get to leverage the CLI APIs.

Another one

Desklets are of course not a new thing, Google and Yahoo both ship desklet systems. OSX and Vista have widgets and gadgets as well. Gnome has gDesklets, KDE has SuperKaramba.

This is merely our take on the challenge as part of Novell's hack week and it is also a good way of exercising our Moonlight engine, the Gtk# binding, Mono and try to learn something new in the process.

Marek's weather applet

If you have not seen them, you should check out what other folks at Novell are doing during their hack week. There are some videos here. Today it seems to be strongly slanted towards Evolution and panel applets.

Posted on 28 Jun 2007 by Miguel de Icaza
This is a personal web page. Things said here do not represent the position of my employer.