GNOME in Moblin: Myzone

Howdy, i’m sure most people are aware of the recent release of Moblin 2.0; a user experience for netbooks. I’m going to write a few blog posts about how the Moblin user experience is built on the awesome technologies in the GNOME platform.

So first up, let’s look at the Myzone, we’re starting here since this is the first thing I really worked on in the Moblin UX and i’ve been able to see it through from early ideas to the 2.0 and 2.1 releases.

So, deep breath, the idea behind the Myzone is to provide a springboard to things that matter to you most: your recent files and web pages you’ve visited, your upcoming events and things you need to do, things that are happening on social web services and your favourite applications.

Now then, that’s the theory, how does it work:

  • Recent files: Recent file information is pulled from the GtkRecentManager and the thumbnails are pulled from the XDG thumbnail specification directory. Metadata for the file comes courtesy of gio which I presume comes from shared-mime-info. Yay. By using the GtkRecentManager for all our recent activity metadata across the platform we’re allowing legacy GNOME applications to just work. Sweet.
  • Events and tasks: These are pulled from EDS using libjana, a calendaring library primarily developed by Chris Lord (of Dates fame.) A couple of months back (well, uh, March) I enhanced libjana to support tasks and thus we are able reuse the existing Tasks/Dates apps for interacting with the calendar.
  • Favourite apps: Here I let the side down. I use some quite crazy custom format for doing this which frankly stinks. I’m going to try and sit down with the GNOME shell guys to see if we can come up with some better way for dealing with user originated application metadata.
  • Social networking/web service integration: This comes courtesy of Mojito and librest, two projects that I and the esteemed Ross Burton have been working on. Mojito is a project that pulls in content from a variety web services into a centralised place, abstracting some of the complexity and the makes it trivial to query. librest is a library for to keep developers happy even though they’re having to deal with web services. It does this by making requests and parsing the result simple.

Moblin talks this week at GCDS

I hope everyone is enjoying the ice cream! So this week there are going to be some talks by me and my colleagues at the summit.

11:30 on Sunday, Joshua Lock will be talking about ConnMan and the lesson’s that he’s learnt from building the Moblin UI for it. This talk will take place in Room 3, “Palacio de la música”. ConnMan: New Connection Manager

5pm on Sunday, I will be talking about Mojito and librest; social web service integration for the GNOME/Moblin stack. This talk will take place in the “Gran Canaria” room. Sipping Mojitos and thinking RESTful thoughts

5:45pm on Sunday, our glorious Emmanuele Bassi will be giving five short lightening talks on various aspects of the Clutter library. This talk will be in the “Cámara” room. State of Clutter

10am on Monday, Patrick Ohly, author of SyncEvolution will be talking about synchonisation in the “Gran Canaria” room. Synchronization: From the SyncML Protocol to Free and Open Implementations

11am on Tueday, Chris Lord, animations guru, will be showing off his Clutter animations skills in the “Cámara” room. Building complex UI animations in Clutter 1.0

And last but not least, at 12pm on Wednesday, our very emminet use experience designer Nick Richards will be taking to the state to talk about the Moblin Netbook UI. Designing Moblin-Netbook. A free desktop on a 7-10″ Screen

A little bit more RESTful

So my last blog post about my work on web services integration: GNOME web services integration: Introducing librest was quite some time ago. Apologies, things have been pretty busy with Moblin.

There are two traditional models for parsing XML, SAX and DOM based methods. These are both pretty heavyweight technologies but for the work i’m doing on web services I want something a bit lighter and a bit simpler to extract just the information I care about. Inspired by the Beautiful Soup HTML screen-scraping library I sought to build an API that lets you trivially find the content you are looking for.

Here is an example:

n = rest_xml_node_find (root, “photo”);
while (n)
  title = rest_xml_node_find (n, “title”);
  printf (“%s”, title->content);
  n = n->next;

Fundamentally the libREST XML parsing strategy turns the XML into a tree of nodes, where a node can have siblings (accessed through a next pointer) or childen (stored in a hash of child tag name to node). This combined with a simple tree walking function (rest_xml_node_find) results in very minimalistic code for extracting just the content you care about.

You can find the source code for libREST in git.


I really like the 3.0 plan. There are two extra areas in particular that i’d like to see us attack:

Firstly (the smaller of the two) i’d like to see a revamping of the Evolution client libraries, ECal & EBook, in particular ECalComponent is horrible. The work that Chris and I have been doing on libjana is showing some of the direction that such a library for accessing calendaring could go. This requires an ABI & API break to do this effectively (hence being a 3.0 thing.)

Ross has also been doing sterling work on the server side of things by migrating the eds-dbus fork into the mainline. This is now basically just waiting on the migration to git and a double review of the calendaring code.

The second and more significant thing that I care about is that I think we need to bring web services closer into the desktop. I’ve been persuaded that desktop applications are not dead but I think we need compelling, transparent and easy ways to integrate with “cloud” services. In particular we are entering an age of “almost always on” connectivity. Many people already find little use for their computers if they are not connected to the Internet. However since the omnipresent and omni-reliable 3G/wireless/wimax utopia is not yet with us we live in a world where we get connectivity in bursts as we travel, socialise and live. Our platform should cunningly pull down interesting content when the user is on cheap and reliable connectivity which they can then peruse when offline or on an expensive and unreliable connection.

A project that Ross and I have been working on at Intel to bring social networks to the desktop/mobile is called Mojito. I’ll cover this in more detail soon.

Ross inspecting the wall
Our hero: Ross Burton

GNOME web services integration: Introducing librest

When OpenedHand was first acquired by Intel I was asked to look into ways of making it easier to access web services from within GLIBish (i.e. Clutter & GTK) applications. We figured that as web services more important to the users of Moblin, and thus by extension, GNOME we needed some way to help developers access them.

So, I did some research, read up on RESTful. And thought yay, lots of services are claiming to be RESTful, let’s see if we can come up with some kind of service description language that we can autogenerate code from (ala, dbus-glib). Turns out that very few services actually adhere to this RESTful definition and my attempts to produce some kind of description language resulted in more lines of XML than code, hmmm.

Anyway, I persevered and looked at building an API that I would fine easy to drive RESTful web services with. After a few iterations I decided upon designing something with a somewhat Cairo-esque API.

Marco thinking RESTful thoughts.

The API is comprised of two parts, the first half is for making the requests (and is based on libsoup.) Here is an example:

  proxy = rest_proxy_new ("", FALSE);
  call = rest_proxy_new_call (proxy);
  rest_proxy_call_add_params (call,
                              "method", "flickr.test.echo",
                              "api_key", "",
                              "format", "xml",
  rest_proxy_call_run (call, NULL, NULL); /* obviously can do async instead */
  payload = rest_proxy_call_get_payload (call);
  len = rest_proxy_call_get_payload_length (call);

Easy, huh? Anyway, enough rambling for today’s blog post, next week i’ll talk about the really interesting stuff we’re (Ross and I) are working on to make parsing XML fun (yes, really, honestly, fun.)

Oh and and the source code can be found in git and it’s licensed under LGPLv2.1, etc etc. (Yes, we have too many libraries, when mature perhaps we can move this into libsoup.)

Lazy web: iPod Shuffle

My iRiver T60 has died after only 6 months of occasional use. This sucks. But since this is my 3rd MP3 player in ~ 2 years I feel i’m somewhat cursed in my ability to lose/break them. So my question is this: If I go into John Lewis (because it’s easy to take back if when it stops working) on Saturday and buy a shiny shiny iPod shuffle and turn myself into a complete sell-out will it *just* work with Rhythmbox 0.11.5? Will it just work or will I need to find a Mac to activate it or something painful like that?

Patchsquad BOF [Updated]

Since Kristian’s excellent GTK State of the Union talk was today his slot is now available for a Patchsquad BOF. So that’s tomorrow at 11am. Thanks Behdad for allowing us to grab this.

A little background on the idea of a Patchsquad: Primarily the idea is to reduce the workload of maintainers by commenting, not reviewing, patches that are waiting in Bugzilla. This may include testing, checking for obvious issues and gentle pestering of maintainers. Lucas held a BOF last year to introduce the idea that was well attended and a lot said but interest seems to have twindled. Myself and Diego want to try reinvigorate the idea!

Update: Whoops! Looks like we haven’t got that slot afterall. If you’re interested in the Patchsquad pleas some along and speak to either Diego or myself.