[Pkg-utopia-maintainers] xdg-desktop-portal-gtk is installed when user specifies to install xdg-desktop-portal-kde with flatpak

Simon McVittie smcv at debian.org
Thu Sep 20 23:16:34 BST 2018


On Thu, 20 Sep 2018 at 22:23:37 +0100, Andrew Hayzen wrote:
> tl;dr; Should xdg-desktop-portal-kde provide xdg-deskop-portal-backend?

Presumably. If it's a valid implementation of the same interfaces as
xdg-desktop-portal-gtk (installs
/usr/share/xdg-desktop-portal/portals/*.portal listing various
interfaces of the form org.freedesktop.impl.portal.Foo) then it
should implement the virtual package.

I was about to report a bug, but
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890910 already exists.

> From my understanding of xdg-desktop-portal, one only needs a single
> backend installed - either the -gtk or -kde - depending which desktop
> environment they want the portals to feel integrated into.

Almost, although it isn't quite that simple. There are several interfaces
that can be provided (FileChooser, Print, Screenshot and so on). For
each one, xdg-desktop-portal tries to find the most appropriate backend:

- the first backend in alphabetical order where UseIn matches
  XDG_CURRENT_DESKTOP (e.g. -gtk has UseIn=gnome) that
  provides the interface;
- or if there is no matching backend, the first backend in alphabetical
  order that provides the interface

So on KDE (assuming you have UseIn=kde, or plasma, or whatever KDE uses
for XDG_CURRENT_DESKTOP) you'll generally get the -kde backend - unless
there are (new?) interfaces that are only implemented in the -gtk backend,
in which case you'll get the -gtk implementation of those interfaces
(if -gtk is also installed) and the -kde implementation of the rest.

-gtk is the default implementation of the virtual package, because
it's basically the reference implementation (it's maintained by the
same people as flatpak and the desktop-agnostic x-d-p frontend) and it
should fit reasonably well into multiple desktop environments (GNOME,
XFCE, LXDE and the various GNOME forks like MATE and Cinnamon).

It should be harmless to have both -gtk and -kde installed, other
than wasting an insignificant amount of disk space. I'd suggest giving
KDE/Plasma desktop metapackages a Recommends on xdg-desktop-portal-kde
to make sure most KDE users have that one available.

> Would this then allow the user to
> install flatpak with xdg-desktop-portal-kde and without installing -gtk
> ?

That's already possible - it's only a Recommends. However, having
-kde provide the virtual package would make that configuration easier
to achieve.

    smcv



More information about the Pkg-utopia-maintainers mailing list