FS#70834 - [xdg-desktop-portal-wlr] Add slurp as dependency

Attached to Project: Community Packages
Opened by Mynacol (mynacol) - Thursday, 13 May 2021, 09:23 GMT
Last edited by Maxim Baz (maximbaz) - Thursday, 03 June 2021, 11:56 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Maxim Baz (maximbaz)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
WebRTC screen sharing did not work in Firefox (Wayland backend) under Sway, although I followed the steps in the wiki: <https://wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing>.
I digged further by manually executing xdg-desktop-portal and xdg-desktop-portal-wlr manually.

Steps to reproduce:
When executing `xdg-desktop-portal-wlr -r -l INFO` and trying to use screen sharing, e.g. with this test page <https://mozilla.github.io/webrtc-landing/gum_test.html>, I get the following output:
```
2021/05/13 11:03:02 [INFO] - dbus: create session method invoked
[...]
2021/05/13 11:03:02 [INFO] - dbus: select sources method invoked
[...]
2021/05/13 11:03:02 [INFO] - dbus: option types:3
2021/05/13 11:03:02 [INFO] - dbus: option multiple: 0
2021/05/13 11:03:02 [INFO] - wlroots: capturable output: Unknown model: 0x053B: id: 39 name: eDP-1
/bin/sh: line 1: slurp: command not found.
2021/05/13 11:03:02 [ERROR] - wlroots: no output found
2021/05/13 11:03:02 [INFO] - dbus: session closed
```

Clearly, slurp is missing on my system. After installing it, screen sharing just works as intended.

Therefore, slurp should be a hard dependency for xdg-desktop-portal-wlr (or does this vary by window manager?)

Additional info:
* xdg-desktop-portal-wlr 0.3.0-1
* Firefox with MOZ_ENABLE_WAYLAND=1
* Sway
This task depends upon

Closed by  Maxim Baz (maximbaz)
Thursday, 03 June 2021, 11:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in 0.4.0
Comment by Trygve Aaberge (trygveaa) - Thursday, 20 May 2021, 10:05 GMT
I just ran into this as well, and agree that it should be added as a dependency or at least as an optional dependency.

The man page for xdg-desktop-portal-wlr says that you can choose between different choosers, so that's a reason to only have slurp as an optional dependency. However, since it doesn't work at all with the default config if neither slurp, wofi nor bemenu is installed and you have to look in the logs to figure out why, it might be best to have slurp as a hard dependency. slurp is a very small application with only common dependencies anyways.
Comment by Maxim Baz (maximbaz) - Friday, 21 May 2021, 09:54 GMT
Hello, I think it's a bug in xdg-desktop-portal-wlr, as their man page says that it will fallback to how it behaved before they added selection capability via slurp:


chooser_type = type Specifies the input send to the chooser.

The supported types are:
- default: xdpw will try to use the first chooser found in the list of hardcoded choosers
(slurp, wofi, bemenu) and will fallback to an arbitrary output if none of those were found.


Would one of you be able to create a bug report and link here? Otherwise I'll try to reproduce and make a report at some point :)
Comment by Trygve Aaberge (trygveaa) - Friday, 21 May 2021, 11:50 GMT
Ah, somehow I missed that part in the man page. I'll open a bug report.

It could still be beneficial to add slurp as an optional dependency though.
Comment by Maxim Baz (maximbaz) - Friday, 21 May 2021, 11:53 GMT
agreed, that I will do
Comment by Trygve Aaberge (trygveaa) - Friday, 21 May 2021, 12:01 GMT Comment by Maxim Baz (maximbaz) - Friday, 21 May 2021, 14:17 GMT
I added all 3 supported choosers to optdepends. Even though upstream has confirmed the bug and discovered that it is already fixed (and will be part of the next release), we can of course keep this open for visibility.

Loading...