Linux App Summit 2019 and Sugar Learning Tools

Last week I traveled to Barcelona, Spain to attend the Linux App Summit. For the first time, GNOME and KDE co-hosted this event to bring together everyone involved in the Linux application ecosystem. The summit was packed with a diverse audience from all over the desktop community and the world. Being there and being part of what is coming for the future of this ecosystem was truly an enriching and motivating experience.

The always-wonderful group photo

Equally important, I was able to meet with former colleagues and friends from Endless, and from the GNOME community. I made many new friends as well. All of this is certainly priceless for someone living far, far away. If you want to know more details about what happened during the summit, I highly recommend reading blog posts like the ones from Julita Inca, Daniel Garcia Moreno, Nick Richards and others. The social media coverage was superb, so check their twitter and youtube channels as well.

During the summit, I had the opportunity to present a lightning-talk titled Flooding the desktop with great learning tools. In this blog post, I will try to expand just a bit more on the details of this project. TL;DR I am making Sugar applications available to all desktops and Linux distributions using Flatpak and Flathub. But first a bit of context.

That is me making the most out of my precious five minutes. Thanks to Matthias Clasen for the encouragement and this picture.

Sugar is a unique desktop and a set of applications for Linux. It was designed for children to learn while having fun. It is Free and Open Source Software. Sugar Labs is a community of volunteers who maintains the project until this day. Since its original release, as part of the One Laptop Per Child project, dozens of educators and developers have created hundreds of great learning tools, most of which are only available for this platform.

Flatpak is a next-generation technology for building, distributing and safely running applications on Linux. It allows developers to build their applications once, and ensures that it will run properly on any Linux distribution. Beyond its technical marvels, it is a game-changing technology that will bring developers and users closer than ever before. Flathub is a community-driven hub for distributing and downloading applications powered by Flatpak. Both Flatpak and Flathub are Free and Open Source Software, as well.

I have spent many years working on desktop technologies in education and access to information, including the Sugar desktop and Endless OS. So the idea of putting Sugar and Flatpak together started a few years ago, while I was working at Endless, one of the early-adopters of Flatpak.

Sugar homepage screenshot
The Sugar desktop with a custom background image

It was easy to see that this is a clear win-win situation. Sugar has many unique learning tools that do not exist on the desktop, and Flatpak has the potential to reach new desktop users.

But, how does this project differ from the Sugar applications already available through package managers? Depending on your Linux distribution, you could technically install a small selection of these applications today. But there are two big caveats. First, you will need to install the Sugar desktop or at least some of its system services just so they can run. Second, and most important, you won’t be able to do much with these applications unless you are doing it within Sugar. These applications depend heavily on the Sugar paradigms and APIs, which are quite different from desktops like GNOME or KDE.

As an example, Sugar users don’t need to deal with file system directly, instead they use something called the Journal, which is not available outside Sugar. But they certainly need to deal with the file system in the desktop.

So, to combine both worlds, I created a small library that makes it easier to port these applications to the desktop. It provides the basic building blocks needed for the job, like:

  • A base desktop application that acts as a middle man between the desktop and the Sugar application.
  • A set of compatibility UI components that can be used as a replacement for Sugar-specific components.
  • A set of utilities to generate the metadata needed for a desktop application, basically, the appdata.xml, .desktop and mimetypes.xml files.

With the help of this library, porting applications is surprisingly easy. In most cases, the changes result in small patches that are easily maintainable downstream. Of course, this simple approach has its downsides. As an example, collaboration is disabled since there is no Sugar collaboration service, nor is mimicked by the library.

Once the application is ported, it can be packaged as any other desktop application with Flatpak and published on Flathub. I already ported a few of my favorite applications, two of which are already published on Flathub. My plan is to port as many applications as possible with the help of Google Code-in students this winter.

Abacus now available on Flathub
Music Keyboard now available on Flathub

If you find this project interesting and want to contribute, feel free to contact me!

Last but not least, special thanks to Nick Richards, a former colleague at Endless and Flathub admin, for his early review of this work during the summit, and to Javier Martinez Canillas and his family for hosting me during that week in Barcelona.

Recipes Hackfest 2018

GNOME and Endless have two similar apps, GNOME Recipes and Endless Cooking. Recipes specializes in sharing recipes between its users, by allowing them to add new recipes from the app, but the way it distributes the content is rudimentary. On the other hand, Cooking, specializes in distributing existing recipes. The distribution of this content is done with the Endless Knowledge framework and is used successfully in dozens of other Endless apps but, it is not possible to contribute new recipes from the app.

GNOME Recipes
Endless Cooking

Based on that, it was clear that both teams had a lot to share and learn from each other so, we held a hackfest at the University of AMIKOM in Yogyakarta, which kindly provided everything we needed.

From the GNOME Recipes team we had Matthias, Emel and Ekta, from the Endless team we had Philip, Emmanuele, Cosimo, Jonathan and me, and from the community we had  Umang, Ahmad, Kukuh and Siska. We also had students attendants from the university.

GNOME and Endless teams

On the first day of the hackfest both teams showed their apps. These presentations helped everyone in the room to understand the strengths and weaknesses of each app and, more importantly, to present the topics that we wanted to cover during the hackfest. The main conclusion of this session was that Recipes should use the Endless content library, and that we would aim to have this for GUADEC. Additionally, Philip did a demo about the Endless content libraries, taking an existing online content source and having it running in a native app. We also discussed ways of introducing more recipes from the local community into Recipes.

Philip writing goals

On the second day, we moved to the details of the front-end. Emmanuele talked about Emeus which triggered the discussions about the Layouts and Cards from the Endless Knowlegde framework. The conclusion was that it would beneficial to separate the Card implementation from the framework so it could be reused in other places like the Recipes app, GNOME Software and even other components of the Endless desktop. After that, we moved on hacking things. Philip started to reproduce the Recipes UI using the Endless framework, while I started converting the Recipes database into an Endless framework content.

On the last day, we showed what we hacked the previous day. I started by showing the converted Recipes database running in different Endless apps, Cosimo showed a Karaoke app that he bundled using flatpak, and Philip showed his recreation of the Recipes UI running with the converted database that I made, which looked incredibly similar and amazing.

Home page of the Recipes UI recreation using Endless framework
Real Recipes content

This exercise of recreating the Recipes app using the Endless framework was extremely helpful, because it revealed the places where we should improve our libraries to make these more flexible for new types of contents. On a personal level, this was the most productive hackfest I have attended. It gave me new directions on how to improve the tools that I am working on. Plus, it helped me to connect and to meet with a lot of new people from the community.

I really want to thank the GNOME Foundation for sponsoring my travel to Indonesia, from Paraguay, and to my employer Endless for giving me the time to attend to the hackfest.