FS#79883 - [sway] xdg-desktop-portal 1.17 requires desktops to declare portals

Attached to Project: Arch Linux
Opened by Matthew Hague (shakedown1979) - Saturday, 07 October 2023, 12:27 GMT
Last edited by Brett Cornwall (ainola) - Sunday, 29 October 2023, 00:56 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Jerome Leclanche (Adys)
Brett Cornwall (ainola)
Maxim Baz (maximbaz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

As of version 1.17, xdg-desktop-portal requires desktops to declare which portals should be used. Arch Linux recently upgraded to 1.18, causing existing (my) setups to break.

https://github.com/flatpak/xdg-desktop-portal/blob/main/doc/portals-conf.rst

For Sway, this requires a file /usr/share/xdg-desktop-portal/sway-portals.conf (or a local user config).

An example file would be

[preferred]
default=wlr;gtk

Or it could be "default=*" to just use anything available in alphabetical order.

It's not clear to me whether this should be the responsibility of upstream, the distribution packager (like 50-systemd-user.conf), or the end user to provide the config. I thought i'd flag it up to see what opinions are. I'm happy to add a note to the wiki if it's preferred to leave it to the user.
This task depends upon

Closed by  Brett Cornwall (ainola)
Sunday, 29 October 2023, 00:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  Hi all. So sorry for the delay in addressing this. I've pushed a fix to sway-1:1.8.1-2
Comment by Toolybird (Toolybird) - Saturday, 07 October 2023, 21:26 GMT
This seems to be filed/assigned against the wrong pkg. Why should x-d-p care about sway? Surely it's the responsibility of each desktop to configure its own portal setup?
Comment by Matthew Hague (shakedown1979) - Saturday, 07 October 2023, 21:35 GMT
Yes, i agree, sorry, i thought i had filed it against sway...
Comment by Matthew Hague (shakedown1979) - Saturday, 07 October 2023, 21:41 GMT
Oh -- i think i just didn't get how this bug tracker works and should have made the description more obvious that it was about Sway. I don't think i can create "sway" bugs, even if i clicked through from the sway package.
Comment by Balló György (City-busz) - Saturday, 07 October 2023, 23:15 GMT
Fedora uses this config: https://src.fedoraproject.org/rpms/sway/blob/rawhide/f/sway-portals.conf

It would be preferable to add this to the upstream code, so please open an issue here: https://github.com/swaywm/sway/issues
Comment by Matthew Hague (shakedown1979) - Sunday, 08 October 2023, 09:34 GMT Comment by Matthew Hague (shakedown1979) - Sunday, 08 October 2023, 09:50 GMT
Upstream say "no" -- i'll go for a note in the Wiki.
Comment by Balló György (City-busz) - Sunday, 08 October 2023, 12:29 GMT
I think it is the upstream responsibility of xdg-desktop-portal support. But since we have xdg-desktop-portal in our repositories, it would be preferred to add this configuration file, otherwise no portal will be loaded, so any applications which rely on portals will fail.
Comment by Danilo (danilo) - Friday, 20 October 2023, 09:16 GMT
From what I can tell, if upstream does not want to hardcode their preferred portals (which is the right decision in my opinion), the Arch sway package is the right place to add this config file.

The value "wlr;gtk" seems sensible to me as a default. Users that want to use different portals can set up their own config file.
Comment by Brett Cornwall (ainola) - Sunday, 29 October 2023, 00:55 GMT
Hi all. So sorry for the delay in addressing this. I've pushed a fix to sway-1:1.8.1-2.

Loading...