Posted on

Integrating sandboxed Vala apps with the host system through xdg-desktop-portals

Portals are a mechanism through which applications can interact with the host environment from within a sandbox. They give the ability to interact with data, files, and services without the need to add sandbox permissions.

Examples of capabilities that can be accessed through portals include opening files through a file chooser dialog, or printing. More information about portals can be found in Sandbox Permissions.

Some portals, such as the FileChooser one, provide an almost seamless experience without much extra code on the app side. For other portals, you usually need some code to talk to the portal’s DBus interface or use libportal.

Vala was designed specifically for the development of GNOME apps, and it has some nice syntax-sugar that makes the communication with DBus pretty simple to implement.

GNOME Boxes is written in Vala and, for this reason, instead of consuming libportal, I introduced a small singleton Portal class that centralizes the whole portal communication logic for the app. This turned out to be quite convenient, so I am copy-pasting it in other Vala apps I work on, and sharing this here in case it can be useful to you too. 🙂

This works because in Vala you can define a namespace matching the desired DBus interface name and with annotations, you can bind objects, properties, and methods to a DBus service. See the Vala DBus Client Samples for more examples.

With the Portal singleton, a call to the Background portal requesting permission for the app to run in the background gets as simple as:

var portals = Portals.get_default ();
yield portals.request_to_run_in_background ((response, results) => {
    if (response == 0)
        // do something...
});

Notice that this is an async call and you may pass a callback to handle its response.

Nothing written here is new, but I thought it was worth sharing this snippet to help others make their apps integrate with xdg-desktop-portals and reduce the unnecessary exposition of user data in sandboxed environments.

Posted on

GNOME LATAM 2021 was a real blast!

This year, motivated by the success of virtual events like GNOME Asia and GNOME Onboard Africa, we decided to organize a GNOME LATAM (virtual) conference. The event was a success, with a nice mix of Spanish and Portuguese-speaking presenters. The recordings are now available and (if you understand Spanish or Portuguese) I highly encourage you to check what the Latin American GNOMies are up to. 🙂

  • Juan Pablo Ugarte, from Argentina, that most of you GNOME people know from his work on Glade, had an interesting talk showing his new project: “Cambalache UI Maker”: A modern Glade replacement for GTK4. Juan hasn’t open sourced it yet, but you’ll see it when he pops up in Planet GNOME.
  • Claudio Wunder, from Germany, that you may know from the GNOME engagement team, did a presentation about the engagement team’s work in GNOME and discussed the challenges of managing online communities with its cultural differences and all. Claudio studied in Brazil and speaks Portuguese fluently.
  • Daniel Garcia Moreno, from Spain, that you may know from Endless and Fractal, had a talk sharing his experiences mentoring in GSoC and Outreachy. This was also a good opportunity to introduce the programs to the Latin American community, which is underrepresented in FOSS.
  • me, from Brazil :D, presented a “Developing native apps with GTK talk” where I write up a simple web browser in Python, with GTK and WebKitGtk, while I comment on the app development practices we use in GNOME, and present our tooling such as DevHelp, GtkInspector, Icon Browser, GNOME Builder, Flatpak, etc…
  • Martín Abente Lahaye, from Paraguay, that you may know from GNOME, Sugar Labs, Endless, and Flatseal, had a presentation about GNOME on phones. He commented on the UX of GNOME applications and Phosh in phones, and highlighted areas where things can be improved.
  • Cesar Fabian Orccon Chipana, from Perú, former GSoC intern for GNOME, GStreamer, did an extensive demo of GStreamer pipelines, explaining GStreamer concepts and all. He had super cool live demos!
  • Rafael Fontenelle, from Brazil, is a coordinator of the pt_BR translation team for many years and translates a huge portion of GNOME himself. He did a walk-through of the GNOME translation processes, sharing tips and tricks.
  • Daniel Galleguillos + Fernanda Morales, from Chile, from the GNOME Engagement team, presented design work for the GNOME engagement team. Showing tools and patterns they use for doing event banners, swag, social media posts, and all. Daniel was also responsible for editing the event recordings. Thanks a lot, Daniel!
  • Fabio Duran Verdugo and Matías Rojas-Tapia, from Chile, a long-time GNOME member, presented Handibox. An accessibility tool they are working on at their university to help users with motor impairment use desktop computers. Inspiring!
  • Georges Basile Stavracas Neto, from Brazil, you may know from Endless and GNOME Shell, presented a very nice summary about the GNOME design philosophy and the changes in GNOME Shell 40 and their plans for the future.
  • The event was opened and closed by Julita Inca Chiroque, from Peru, a long-time GNOME Foundation member. Thanks a lot, Julita!

I hope we can make this a tradition and have a GNOME LATAM edition yearly! Thanks a lot to all attendees!

Posted on

Let’s welcome our new interns!

It is that time of the year again when we get to meet our new interns participating in both Outreachy and Google Summer of Code. This year the GNOME Project is proud to sponsor two Outreachy internships for the May-August season and to mentor 12 students in GSoC 2021!

Our Outreachy projects are listed here, and you can find our GSoC projects here.

Our interns have received an email with instructions for the community bonding period, and you will start seeing their blog posts appearing in Planet GNOME very soon. Make sure you say “hello” and make them feel welcome in our project. Keep in mind that beyond the project’s tasks, we want them to become long-term contributors and, later on, Foundation members. You also will have a chance to get to know about their projects during our Intern Lightning Talks at GUADEC.

If you have any doubt about our participation in these programs, feel free to contact the GNOME GSoC admins or join the #soc channel.

Happy hacking!

Posted on

Student applications for Google Summer of Code 2021 are now open!

It’s that time of the year when we see an influx of students interested in Google Summer of Code.

Some students may need some pointers to where to get started. I would like to ask GNOME contributors to be patient with the student’s questions and help them find where to get started.

Point them at https://wiki.gnome.org/Outreach/SummerOfCode/Students for overall information regarding the program and our project proposals. Also, help them find mentors through our communication channels.

Many of us have been Outreachy/GSoC interns and the positive experiences we had with our community were certainly an important factor making us long-term contributors.

If you have any doubts, you can ask them in the #soc channel or contact GNOME GSoC administrators.

Happy hacking!

Posted on

Save the date: GNOME LATAM 2021, March 27th

I’m happy to spread the word that a GNOME event in Spanish and Portuguese is taking place this month, on the 27th of March. It will be a free virtual event with talks and panels where everybody is welcome.

You can register at https://events.gnome.org/event/82/registrations/33/

You can send talk proposals (in Portuguese and Spanish) at https://events.gnome.org/event/82/abstracts/

See you there!

 

Posted on

Call for Project ideas for Google Summer of Code 2021

It is that time of the year again when we start gathering ideas for Google Summer Code.

This time around we will be posting and discussing proposals in GNOME’s GitLab instance. Therefore, if you have a project idea that fits Google Summer of Code, please file an issue at https://gitlab.gnome.org/Teams/Engagement/gsoc-2021/-/issues/new using the “Proposal” template.

Everybody is welcome to add ideas, but it would be nice to verify whether the ideas are realistic and mentorship for it will be available. We encourage you to discuss your ideas with designers in #gnome-design to get their input and plan collaboration, especially if your ideas are related to one of the core GNOME modules.

Keep in mind that there are a few changes in GSoC this year:

  1. Smaller project size all students participating in the 2021 program will be working on a 175 hour project (instead of a 350 hr project). This change will also result in a few other changes including the student stipend being cut in half.
  2. Shortened coding period – the coding period will be 10 weeks with a lot more flexibility for the mentor and student to decide together how they want to spread the work out over the summer. Some folks may choose to stick to a 17-18 hour a week schedule with their students, others may factor in a couple of breaks during the program (for student and mentor) and some may have students focus 30 hours a week on their project so they wrap up in 6 weeks. This also makes it a lot easier for students with finals or other commitments (weddings, etc.) to adjust their schedules.
  3. 2 evaluations (instead of 3) – There will be an evaluation after 5 weeks and the final evaluation will take place after the 10th week. We are also no longer requiring students complete their first evaluation (though we encourage them to do so), so if a student doesn’t complete the first evaluation they will not automatically be removed from the program. They are still required to complete the final evaluation.
  4. Eligibility requirements – In 2020 there are many ways students are learning and we want to acknowledge that so we will be allowing students who are 18 years old AND currently enrolled (or accepted into) a post-secondary academic program as of May 17, 2021 or have graduated from a post-secondary academic program between December 1, 2020 and May 17, 2021 to apply to the GSoC program.

If you have any doubts, please don’t hesitate to contact the GNOME GSoC Admins on Discourse or https://chat.gnome.org/channel/outreach

** This is a repost from https://discourse.gnome.org/t/call-for-project-ideas-for-google-summer-of-code-2021/5454 to reach a broader audience. Please share! **

Posted on

Delivering osinfo-db updates automatically for Flatpak users

If you are familiar with GNOME Boxes internals you are aware that our secret sauce is libosinfo. It does the OS image detection and provides us with a database of devices, preferences, and compatibility for the operating systems we support.

In the world of traditional package management tools, osinfo-db is the package responsible for delivering updates about new operating system’s releases, fixes, and improvements that Boxes will consume. So whenever you wonder why the newest EndlessOS or the newest Debian release isn’t listed in the Boxes download section, it is likely that osinfo-db is outdated.

The pipeline from upstream -> distros -> to users is extremely valuable for apps and libraries. It is our “integration testing” phase. But for data-only packages like osinfo-db, we noticed that most users’ complains are regarding the package being outdated. We rarely see bugs introduced by osinfo-db updates. The very separation of the dataset (osinfo-db) and the library (libosinfo) is the reason for us to feel confident about contentiously delivering the dataset directly to our users.

For this reason, Flatpak users of GNOME Boxes will now benefit from the OsinfoDb Flatpak extension. It allows us to deliver osinfo-db updates direclty to users without updating the entire Boxes Flatpak. If you are receiving automatic updates in GNOME Software, the osinfo-db update is seamlessly.

Boxes still bundles its own osinfo-db data for those that don’t want to consume the extension. This will be updated whenever the Boxes Flatpak is updated, so expect it in a slower cadence.

Nothing is required from users to transition to this. Flatpak will pull the extension for you once you update Boxes.

Posted on

GUADEC 2020: Intern lightning talks

This year’s GUADEC was a blast. I miss seeing everybody in person but, at the same time, the online event enabled the participation of many that otherwise wouldn’t be able to attend the conference. I hope we can continue having an online conference alongside our in-person ones, for more people to participate.

During the Intern lightning talks, we had the chance to follow up with the progress of 12 of our 14 GSoC interns and hear from 5 past interns about their experiences after finishing their internships with GNOME.

The past-interns lightning talks session is something I want us to repeat next year. It was a great opportunity for our current interns to inspire themselves with the journey of others that have managed to stay involved with the project. This is extremely important to us because the ultimate goal of having internships is to provide an opportunity for developers to get involved with GNOME long term, becoming the next generation of hackers that will continue pushing our community forward.

Managing a session with 17 different presenters was made easy thanks to Big Blue Button. The recordings are available below.

Posted on

Identifying Operating Systems in GNOME Boxes

One secret sauce of GNOME Boxes is libosinfo. It basically is an umbrella for three components: libosinfo, osinfo-db-tools, and osinfo-db.

libosinfo offers programmatic means to query for information about OSes. osinfo-db-tools is a set of tools that help manipulate and extract information from OS images (such as ISO files). osinfo-db is a database of operating system information describing requirements for virtualized installations as well as virtual drivers and devices that work with each OS in the database.

For a given image file, Boxes will use libosinfo to detect which operating system it contains and assign the appropriate configuration preferences for it.

When an operating system’s data was not present in osinfo-db, we used to treat the image file as an “unknown OS”, which would get set up with the Boxes default configuration preferences. This usually works, but when it fails, it gets really hard for a regular user to use the virtual machine. Think of a wrong virtual video driver causing the guest’s graphic session to hang, or a virtual tablet device getting on the way of gestures being passed to the guest, etc…

For this very reason, we decided to add an extra page in our VM creation assistant that will only get visible for those “unknown” OSes. This page allows you to specify which operating system you intend to install. This way Boxes can use libosinfo to set up your VM with the right configuration preferences for the chosen OS.

screenshot

If you can’t find your OS in the list, try picking a similar one. For instance, if Linux Mint isn’t on the list, you are probably better off telling Boxes it is a Ubuntu or Debian based OS.

Not choosing anything on this page is also fine, in this case, Boxes will go with its defaults.

New operating systems can be added to the osinfo-db by creating merge requests in their GitLab repository.

This (with some more polishing) and other changes will be available in GNOME Boxes 3.38. If you can’t wait, give a go to our *unstable* nightly Flatpak.

Posted on

GUADEC 2020: Intern lightning talks

Hi, I hope you are all enjoying GUADEC! I am just passing by to let you know that on Monday 27th, 18:00 UTC, we will have our traditional Intern lightning talks where you will get to see our Outreachy and Google Summer of Code  interns present their projects.

This year we will also have a few past interns sharing their stories about their experiences as interns and how GNOME has helped their professional careers.

https://events.gnome.org/event/14 (Track 1)

Stay tuned!