Google Summer of Code’16 with Sugar Labs

Hi! I am Ütkarsh Tiwari, an Open Source enthusiast and  a passionate game developer. My overwhelming journey of open source began with my first activity (Buttons and Scissors) for Sugar Labs which I wrote back in January’15. It was because of the immense help and guidance provided by Mr. Alan Jhonn Aguiar Schwyn(Sugar developer profile.

Each of my 6 activities have crossed over 7k download hits and  have been ranked consistently in top downloads for weeks. Looking forward to writing more activities using some new technologies like OpenGL.

I am very happy to announce that all my hard work paid-off with a paid internship offer from Google Summer of Code’16 to work on an open source project for Sugar Labs!

My first patch to Sugar core was generated 1.5 months prior to GSoC application period i.e February’16. Within that 1.5 months time span, I had decided that I’ll contribute as much as I can to be able to convince my mentors of my programming abilities. Believe it or not, I had always been intimidated by the Sugar codebase (especially Gtk+) because of which I just kept writing activities 😀 But after my first patch on Gtk+, I felt a lot more confident with it and was fascinated by the power it gives a Python developer to design a perfect GUI.

My habit of taking up on challenging tasks helped me earn a lot of recognition  and appreciation in Sugar community. I tried solving tickets which had been open for more that 2 years and eventually brought them to existence. I also translated over 700 English strings to Hindi on pootle which helped add an edge over other applicants. In short I was a bit strategized about my selection 😉  Here is the link to my proposal.

Below is the list of the PRs I generated for Sugar codebase-

Most of them are yet un-merged because of the strong community consensus needed before integrating any big change into Sugar.

After the results were announced, I got a mail from Mr.Dave Crossland stating that my proposal was rated #1 among all 62 applications. Well..this gave a real sense of fulfillment knowing that I was the priority applicant for Sugar Labs 🙂
Whatever I am today is mostly because of the knowledge I have gained for the developers in Sugar community and the invaluable guidance given by them.


(23rd April-23rd May)

With the advent of the community bonding period I began my interaction with my mentors, Mr. Tony Anderson and Mr. Sebastian Silva. We all planned out our roadmaps on irc with are daily detailed discussions. I and Tony decided to re-work one of the last year’s GSoC projects (JS-Fiddler) to get it ready for deployment.


(24th May-23rd Aug)

JS Fiddler

Suggested UI Design

  • User Interface

  • Initial tab

  • HTML code in action

  • HTML + CSS code in action

  • Viewing page source


  • Redesigned the toolbar  menu/icons of the fiddle to fit in the extended toolbar of the Browse.
  • Reconfigured the menu items to their respective functionalities.


  • Added the view-page-source functionality to enable the user to view the page source of the current fiddle project as well as of the current open webpage in a new tab.
  • Improved the directory structure of the fiddler save mechanism.
  • Add save-as functionality to fiddler to prompt realtime saving of the project by providing a project title in case if the tags are not found in the fiddle code.


  • Optimized the storage directory structure to save cluttering the storage space on XOs by moving it  to /instance directory.
  • Prettified  the HTML/CSS/JS  code in the webconsole and the project.html.


  • Prettified CSS inside webconsole display using “html5print”.
  • DownloadIcon added in the webtoolbar.
  • Webconsole toggle added.

Commits –

Screenshot Popup

This feature intends to providing the user an option to specify the name of the screenshot before it get’s registered in the Journal. With this feature the user is given a choice to decide whether he wants to save or discard the captured shot.

Pull Request–


Save As Popup Alert

This feature intends to provide the user with an alert on close like the other document-creation appplication to provide a save-name. Currently Sugar doesn’t provide any such option but directly terminates the activity and saves the data to datastore which might sometimes be useless to the user.

This feature aims at provide the user with an option to decide whether he wants to save/discard the activity data on close but the jobjects gets registered in the Journal for statistical purpose.

Here is what it looks like –

Sugar-Toolkit-Gtk3  & Sugar-Toolkit (Deprecated)

Initially when I wrote this feature, I designed it to delete the entry from the Journal should the user choose to discard which challenged the mere existence of Journal in Sugar. Sugar Journal was designed to maintain a statistical data of the activities used by user.

Based on our(me and my mentors) consensus, we decided to register the entries in the Journal as it usually happens but prevent the activity data from saving on discard. In this way the Journal would serve it real purpose and user can choose to save or reject the changes.

Though the UI is a controversial subject of discussion within community, the feature performs exactly as what is expected from it.

Pull Requests –

GSettings for ‘Resume Activity’

This feature aims at providing the user with a facility to change the default activity ‘resume’ boolean from command line via terminal.

A new boolean value is now added to gsettings to toggle the default start mode of an activity from home view-
1) If the value is TRUE– Resumed instance opens
2) the value is FALSE – New instance starts

This GSetting value can be toggled from terminal by the following command –
$ gsettings set org.sugarlabs.user resume-activity false (This sets the home view to start the new instance of every activity by default)

$ gsettings set org.sugarlabs.user resume-activity true (This sets the home view to resume the instance by default)

P.S.- This^ boolean can be toggled with ‘Alt’ activity in the homeview but the gsettings value is only meant to set the default action for an activity icon on homescreen.

Implementing this feature was really a ‘cup of tea’ for me 😀 All I had to do is go through the Gsettings documentation and see how it is operated though command line.

The major problem which we faced with this one was like find a needle in a haystack. We were facing bootloops on a XOs since the files associated with this feature were compiled at the boot. A small error, be it syntactical or logical and you end up with a bricked XO.
So I reached to Sugar-devel list for help and as expected, Mr. James Cameron came to my rescue! We were just missing out on a command which was needed to compile the gsettings schemas before fetching the keys. Since we added a new boolean to ‘org.sugarlabs.user’, it had already passed the compilation, so it needed a recompilation.

To our surprise the PR for this request got merged the day after I made it. 😉

Pull Request –

GetBooks offline support

GetBooks activity was designed to let users download ebooks to their XOs for offline read.
Already available book resources includes ‘Internet Archive’ and ‘FeedBooks’.

This GSoC project aims at adding offline support to GetBooks for the users to avail books from school servers if the internet facility is unavailable. The new source appears in the source dropdown list by the name ‘School Server’ the url of which needs to be added to the get-books.cfg.

As a test server I used localhost to fetch books to the activity and it seems to work well with both pdf and .htm files.  Below are the gifs to demonstrate the UI.

Rachel support –

Support support –


Commits –

InfoSlicer offline support

This project at adding offline support to InfoSlicer activity. Currently InfoSlicer access wiki articles from multiple online wikis using MediaWiki API. This integration would provide the user the accessibility to the offline wiki zim files kept on the school servers independent of the availability of internet.

The deployer needs to add the source and query uri to the zim files in the get-url.cfg file for IS to be able to work with Kiwix server.

Below gif demonstrates how this feature works




Finally the time came to bear the fruits of the hard work of three months long project. The results got announced on 24th August 12:00AM IST and I received the reviews of my mentor 🙂 It had been a great pleasure working with such experience developers/mentors who were always there to help me out with the frequents issues.

2 days later I received a mail from Mr. Jost Simmons with my certificate of completion. Yay!