Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1050802: xfce4-session: please provide an xfce-portals.conf for xdg-desktop-portal

108 views
Skip to first unread message

Simon McVittie

unread,
Aug 29, 2023, 7:00:05 AM8/29/23
to
Source: xfce4-session
Severity: normal
Tags: trixie sid
User: xdg-deskt...@packages.debian.org
Usertags: portals.conf

xdg-desktop-portal 1.17.x introduces a new way to select which portals will
be used for which desktop environments, modelled on mimeapps.list:

- each desktop environment should provide a file like
/usr/share/xdg-desktop-portal/xfce-portals.conf

- the filename is ${DESKTOP}-portals.conf where ${DESKTOP} is the desktop
environment's entry in $XDG_CURRENT_DESKTOP (the same as the DesktopNames
from /usr/share/{x,wayland-}sessions/*.desktop), folded to lower case

- sysadmins and users can override this via files named portals.conf or
${DESKTOP}-portals.conf in various locations like /etc/xdg-desktop-portal
and ~/.config/xdg-desktop-portal

Please see portals.conf(5) or its source code
https://github.com/flatpak/xdg-desktop-portal/blob/main/doc/portals-conf.rst
for full details.

As a backwards-compatibility mechanism, x-d-p will fall back to trying
to guess the most appropriate portals from the portals' UseIn= fields,
but it will log warnings when it does that, and anyway Debian doesn't
currently ship any portal backends that are flagged as suitable for XFCE
(although I see there's an ITP open for x-d-p-xapp, #1038946). Please
add an xfce-portals.conf to tell x-d-p more explicitly what backends
XFCE is meant to be using by default.

For example, if the intention is to try to use the -xapp backend, falling
back to -gtk if -xapp isn't installed or doesn't know how to do something,
the way to write that would be:

[preferred]
default=xapp;gtk;

The desktop environment (either xfce4-session or some larger metapackage)
should probably also have a Recommends, or at least a Suggests, on whatever
portals would be most appropriate for it.

Thanks,
smcv

--
This is part of a mass bug filing:
https://lists.debian.org/debian-devel/2023/08/msg00311.html

Yves-Alexis Perez

unread,
Sep 7, 2023, 3:40:05 PM9/7/23
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Tue, 2023-08-29 at 11:51 +0100, Simon McVittie wrote:
> xdg-desktop-portal 1.17.x introduces a new way to select which portals will
> be used for which desktop environments, modelled on mimeapps.list:

Hi Simon,

thanks for the report but I have no idea what a “portal” is. So feel free to
provide a patch for that, I think it's unlikely we'll look at this soon.

Regards,
- --
Yves-Alexis
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAmT6I8MACgkQ3rYcyPpX
RFuC+wf/YhTUai4ctNVzUJC7zPo9F2mgtmGLtOl3IFlD+YaTGtDztZuUIlFrNJL4
J9vIxLjYGtSsxpImkoHnj1lxnn0kX//Msj3cgmn8uyqRmoC0NIQr+Dz2bo8aD2C/
0CsFeflqw20Q9Q2UEKdORppTtbmmosFCyfiyadhL94uSqYhFVC98HnVo7jc+qZoq
2DON8WKNgB4KGe+L4gNbEIV4t8SwhRXsjBx8FVSsE6xWrOjRwBL2MVf/krhxMryr
eCxbC5/Zkb3+u3S5JPEyqhxctD1M3ulanTM42GUT1FUbL96c8YOLq9JwumpLYaBo
QydscbTWY079TGnEH4oTWOI/MRF0Lw==
=qTvF
-----END PGP SIGNATURE-----

Simon McVittie

unread,
Sep 8, 2023, 6:30:05 AM9/8/23
to
On Thu, 07 Sep 2023 at 21:25:55 +0200, Yves-Alexis Perez wrote:
> On Tue, 2023-08-29 at 11:51 +0100, Simon McVittie wrote:
> > xdg-desktop-portal 1.17.x introduces a new way to select which portals will
> > be used for which desktop environments, modelled on mimeapps.list:
>
> Hi Simon,
>
> thanks for the report but I have no idea what a “portal” is. So feel free to
> provide a patch for that, I think it's unlikely we'll look at this soon.

Please see https://lists.debian.org/debian-devel/2023/08/msg00311.html
for more context on what these are.

If you are not already using Flatpak or Snap apps, the easiest
way to try this functionality is to install libportal-tests-gtk3
or libportal-tests-gtk4 and run the /usr/bin/portal-test-gtk3 or
/usr/bin/org.gnome.PortalTest.Gtk4 manual test program, which can do
various operations, some of which will work in XFCE already (like opening
a file dialog) and some of which won't (like enabling screencasting, for
which there are backends for GNOME, KDE Plasma and wlroots-based
compositors, but not XFCE as far as I know).

I can suggest a patch, but I don't use XFCE myself, so I don't know what
XFCE users or developers would want. This is really a question for upstream
more than for Debian (although Debian could fill in the gaps if upstream
is unable to), and I'll try to find time to open an upstream issue. There
are basically two options.

For feature parity with Debian 12,
/usr/share/xdg-desktop-portal/xfce-portals.conf could contain:

[preferred]
default=gtk;

and an appropriate XFCE metapackage could have a Depends, Recommends or
Suggests (whichever is felt to be most appropriate) on
xdg-desktop-portal-gtk. That's the fallback/last-resort backend that works
anywhere, and should fit in reasonably well in any GTK-based environment.

In trixie/sid there is a new package
https://tracker.debian.org/pkg/xdg-desktop-portal-xapp which claims to
support setting wallpaper, inhibiting suspend, taking screenshots,
applying lockdown to settings, and querying desktop environment settings
for Cinnamon, MATE and XFCE (although I don't think all interfaces are
implemented for all three desktops). I haven't tested or reviewed this
myself, and I know that MATE upstream developers are unsure about it (it
seems to have come from Cinnamon and wasn't reviewed or tested by anyone
in MATE). If XFCE wants to use this to provide wider functionality,
then that would be something like:

[preferred]
default=xapp;gtk;

smcv

Simon McVittie

unread,
Sep 11, 2023, 10:20:04 AM9/11/23
to
Control: tags -1 + upstream
Control: forwarded -1 https://gitlab.xfce.org/xfce/xfce4-session/-/issues/181

On Fri, 08 Sep 2023 at 11:22:30 +0100, Simon McVittie wrote:
> On Thu, 07 Sep 2023 at 21:25:55 +0200, Yves-Alexis Perez wrote:
> > thanks for the report but I have no idea what a “portal” is. So feel free to
> > provide a patch for that, I think it's unlikely we'll look at this soon.
>
> Please see https://lists.debian.org/debian-devel/2023/08/msg00311.html
> for more context on what these are.

I've opened an upstream issue (linked above) with some more context.

> I can suggest a patch, but I don't use XFCE myself, so I don't know what
> XFCE users or developers would want.

I'm hoping that the upstream issue will lead to a clearer picture of how
the XFCE team see this working in future, and maybe a patch that can
easily be backported.

smcv

Simon McVittie

unread,
Sep 12, 2023, 2:40:04 PM9/12/23
to
Control: tags -1 + patch fixed-upstream

On Mon, 11 Sep 2023 at 15:12:42 +0100, Simon McVittie wrote:
> On Fri, 08 Sep 2023 at 11:22:30 +0100, Simon McVittie wrote:
> > I can suggest a patch, but I don't use XFCE myself, so I don't know what
> > XFCE users or developers would want.
>
> I'm hoping that the upstream issue will lead to a clearer picture of how
> the XFCE team see this working in future, and maybe a patch that can
> easily be backported.

They've applied a MR for 4.18.4 adding the simplest version of
xfce-portals.conf that I previously suggested:
https://gitlab.xfce.org/xfce/xfce4-session/-/merge_requests/47

smcv
0 new messages