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

GSoC 2021: GNOME Foundation has been accepted as a mentor organization!

gsoc logo

 

Yay! We are participating in GSoC once again this year and our org features in the list of this year’s accepted organizations.

If you have any doubt about GSoC, feel free to contact us on #soc IRC/Matrix, email, or Discourse.

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

Summertime sadness

Another summer is about to end and with it comes the autumn* with its typical leaf loss. There’s beauty to the leaves falling and turning yellow/orange, but there’s also an association with melancholia. The possibilities and opportunities of the summer are perceived to be gone, and the chill of the winter is on the horizon.

The weather changes set in at the same time our Google Summer of Code season comes to an end this year. For a couple of years, I have planned to write this blog post to our GSoC alumni, and considering the exceptional quality of our projects this year, I feel that another GSoC can’t go without me finally taking a shot at writing this.

Outreachy and GSoC have been critical to various free and open source communities such as ours. By empowering contributors to spend a few months working fulltime in our projects we are not only benefiting from the features that interns are implementing but also having a chance to recruit talent that will continue pushing our project forward as generations pass.

“Volunteer time isn’t fungible” is a catchphrase but there’s lots of truth to it. Many people cannot afford to contribute to FOSS in their free time. Inequality is on the rise everywhere and job security is a privilege. We cannot expect that interns are going to continue delivering with the same bandwidth if they need to provide for themselves, their families, and/or work towards financial stability. Looking at ways to fund contributors is not a new discussion. Our friends at Tidelift and GitHub have been trying to tackle the problem from various fronts. Either making it easier for people to donate to volunteers and/or helping volunteers get fulltime jobs, the truth is that we are still far from sustainability.

So, if you are a mentor, please take some time to reflect on the reasons why your intern won’t continue participating in the project after the internship period ends and see what you can do to help them continue.

Some companies allow their employees to work in FOSS technologies and our alumni have a proven record of their contributions that can definitely help them land entry-level jobs. Therefore referring interns to job opportunities within your company might be a great way to help. Some companies prioritize candidates referred by fellow employees, so your referral can be of great help.

If you are an intern, discuss with us and with your mentor about your next steps. Reflect on your personal goals and on whether you want to build a career in FOSS. My personal advice is to be persistent. Lots of doors will close, but possibly the right one will open. You have a great advantage of having GSoC/Outreachy on your resume and a proven record of your contributions out in the open. Expand your portfolio by contributing bits that are important to you, and eventually recognition may come.

All in all, a career in FOSS isn’t guaranteed, and as branches grow in different ways, remember that the trunk still holds them together. Your roots are in GNOME and we are very proud to see our alumni thrive in the world, even far away from us.

*at least if you live outside the tropics, but that’s a topic I want to address on another blog post: the obstacles to a career in FOSS if you are coming from the global south.

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.