Dec 13 – 15, 2025
Internet Initiative Japan Inc.
Asia/Tokyo timezone

Sugar Toolkit on GTK4: A case-study in modernizing for today's GNOME

Dec 13, 2025, 1:30 PM
30m
Internet Initiative Japan Inc.

Internet Initiative Japan Inc.

Iidabashi Grand Bloom, 2-10-2 Fujimi, Chiyoda-ku, Tokyo 102-0071
30 minutes presentation: IN PERSON Track A

Speaker

Krish Pandya

Description

Sugar has been central to education-focused free software for almost two decades, powering OLPC laptops and classrooms worldwide. The Sugar Toolkit, which every activity depends on, was stuck on GTK3 and slowly drifting away from the modern GNOME stack. Over the last year I worked on porting it to GTK4, updating the foundations while keeping the learning-first philosophy intact. This talk looks at the practical challenges of the migration, from bridging API gaps and redesigning UI models to balancing backwards compatibility with the need to future-proof the platform. I will share what worked, what broke, and why this effort matters not only for Sugar but for anyone trying to keep old but still useful open source projects alive for new generations of users and contributors.

Category Application Development and Deployment
Talk Description Sugar isn't just a desktop environment, it's a set of ideas about how kids can learn by making, exploring, and sharing. The Sugar Toolkit is the backbone of that, since every activity depends on it. The problem was that the toolkit was stuck on GTK3, which is basically frozen now. Without a move to GTK4, Sugar would slowly break down, and it would be harder for new contributors to even start hacking on it. This talk is about what it took to bring the toolkit forward. That meant systematically replacing outdated application interfaces, adapting new event handling methods, and ensuring that activities built on the toolkit still functioned as expected. But it was never just about swapping out a library. GTK4 forced us to rethink what "an activity" actually means today: layouts, gestures, and rendering work fundamentally differently. This involved embracing modern container patterns, leveraging overlays for dynamic UI elements like alerts, and fundamentally adapting how drawing activities render their content within GTK4's snapshot rendering cycle. This shift in the rendering paradigm took significant time and effort to master and implement correctly across the toolkit. Some of the old GTK3 patterns simply don't exist anymore, leading to real trade-offs: preserve backwards compatibility at the cost of technical debt, or break things to get closer to modern GNOME paradigms. I'll walk through some concrete cases (Only 3 Given here, but am planning for 5-7): Reworking the Sugar toolbar system from the ground up with modern GTK4 components. Rebuilding this central user interface element, known as the ToolbarBox, to support dynamic layouts, expandable sections. Handling drawing activities in GTK4's new scene-graph world, ensuring expected interactions. To facilitate developer adoption, I included graphical examples for all ported graphics, along with three major examples and ported activities, making it easier to kickstart working with the toolkit. I'll also cover the community side: how we engaged with contributors for testing activities, and documented our progress through 12 weekly blogs culminating in a final post detailing the overall journey and how everything worked out (available at sugarlabs.org/authors/krish-pandya), all while keeping the education-focused Sugar community engaged throughout this foundational technical rebuild. The broader point is that technical renewal isn't just code maintenance. It's a survival question for projects that are "too old to maintain, too important to drop." Sugar is one example, but there are many others in free software. This GTK4 port is a case study in how you keep an old codebase alive, how you balance innovation with stability, and what it takes to make educational software last across generations of hardware, contributors, and students. Find out more at the docs: sugar-toolkit-gtk4-py.readthedocs.io
Author(s) Bio ( Hii! , I am Krish aka MostlyK ). Krish Pandya is an undergraduate student at IIIT Hyderabad, studying Electronics and Communication Engineering. He is an active contributor to free and open-source software through Sugar Labs, where he works on Sugar OS, Sugar Activities, and Sugar AI. He also contributes to computer vision research at the Robotics Research Center, focusing on topology, SLAM and Spatial AI . Krish is interested in the intersection of education, open-source, and AI, and enjoys building tools that make complex technology more accessible.
Pronouns He/Him
Where are you located? Hyderabad, India
Do you need travel sponsorship from GNOME Foundation in order to join our event? Yes

Author

Krish Pandya

Presentation materials