Community meeting on IRC 11th January 2024

  • Name/IRC nick: nephros
  • Topic: XDG-Desktop-Portal specification: interesting for Sailfish OS?
  • Some details about the topic:

While experimenting with PipeWire I came across something called “XDG Portal specification”.
I am aware that something like this would be a rather large effort, so this is more of a long-term strategy/design question (SFOS v5/6/7 or so ;)) but here we go:


It is described as:

A portal frontend service for Flatpak and other desktop containment frameworks.

xdg-desktop-portal works by exposing a series of D-Bus interfaces known as portals under a well-known name ( org.freedesktop.portal.Desktop ) and object path ( /org/freedesktop/portal/desktop ).

The portal interfaces include APIs for file access, opening URIs, printing and others.

Ignoring the buzzwords “pipewire” and “flatpack” for a moment, the actual specification for some of the functionality does align with some core functions of Sailfish OS (others are geared more towards proper desktops and can be ignored.).

Flatpak grants sandboxed applications talk access to names in the org.freedesktop.portal.* prefix. One possible way to use the portal APIs is thus just to make D-Bus calls. For many of the portals, toolkits (e.g. GTK) are expected to support portals transparently if you use suitable high-level APIs.

To implement most portals, xdg-desktop-portal relies on a backend that provides implementations of the org.freedesktop.impl.portal.* interfaces.

Sounds familiar, huh? :slight_smile:

For more details, see the links.

IMHO, this presents an opportunity to move from Sailfishos-only interfaces to more widely-used ones, or, maybe, existing functionality can be kept as-is, but additionally be made available on these interfaces.
Thus we could benefit from implementations on other operating systems, applications, and toolkits, and increase interoperability and portability.

Just as an example, Lipstick already has the functionality of triggering a screenshot via DBus on org.nemomobile.lipstick, and this functionality could also be exposed as a Portal on org.freedesktop.impl.portal.Screenshot. Similar things cold be done for e.g. Screencasting, and some of the other specified interfaces.

Also, Applications under SailJail accessing DBus interfaces is a not-very-well-solved problem right now, and following parts of such a specification could help in this regard as well.

So,

  • Purely looking at it from a design standpoint (disregarding implementation efforts for the moment): would Joll(a|yBoys) see any benefits to having some of this on SFOS at all?
  • I believe this could be an area where the community could help, if there is some highlevel guidance.

Links/References:

  1. XDG Desktop Portal
  2. https://flatpak.github.io/xdg-desktop-portal/docs/portal-interfaces.html
  3. https://flatpak.github.io/xdg-desktop-portal/docs/implementation-interfaces.html
  4. Allow portal access non-flatpak sandboxes by WhyNotHugo · Pull Request #741 · flatpak/xdg-desktop-portal · GitHub

  • Approx. time needed: 10min (or more)
  • Substitute (optional):

This topic is a copy of a late submission to the last meeting.

7 Likes