Skip to content

Screencast Compatibility

Dennis Schridde edited this page Jul 14, 2020 · 43 revisions

This guide contains information on applications compatible with xdg-desktop-portal-wlr. If screencasting works for you in some applications, but not others, please review this guide.

WebRTC (a.k.a. Firefox/Chromium)

WebRTC is a protocol and specification for real-time communication, but it is also a shared codebase and a set of APIs used by Firefox and Chromium to provide screen capture and casting functionality. You can test this functionality using the getUserMedia Test Page over on Mozilla's GitHub.

WebRTC contains support for xdg-desktop-portal based screen casting, but requires a special build flag RTC_USE_PIPEWIRE=true in order to be included. Some distros build their browsers with this flag and some do not.

No matter what browser you are using, the WebRTC code will check that the environment variable XDG_SESSION_TYPE=wayland is set in order to function.

Browsers

OS Package Name Supported? Notes
Arch chromium Yes Tested version 81.0.4044.122, requires a feature toggle set in chrome://flags search for pipewire to find it. Requires libpipewire02 installed.
fedora-firefox-wayland-bin Yes Tested version 75.0, Present in AUR only, takes the binary Firefox package from Fedora and repacks it for Arch
firefox No Minimally patches upstream Firefox, doesn't have the correct build flags due to this upstream issue
Alpine chromium No APKBUILD doesn't contain RTC_USE_PIPEWIRE=true flag
firefox Yes As of 2020-06-11, only Firefox in the edge rolling release is patched to support pipewrie and xdg-desktop-portal-wlr is in testing repo
Fedora chromium Yes Build Flag
firefox Yes Pipewire 0.3 Patch
Gentoo firefox Yes Tested using:
  • media-video/pipewire-0.3.6
  • sys-apps/xdg-desktop-portal-1.7.2[screencast]
  • gui-libs/xdg-desktop-portal-wlr-9999
  • gui-wm/sway-1.4-r2
  • www-client/firefox-78.0.2[screencast]
Use xdp-screen-cast.py to make sure that xdg-desktop-portal and xdg-desktop-portal-wlr are running and work.
Requires the "screencast" USE-flag to be set for Firefox, which is still masked:
mkdir -p /etc/portage/profile/package.use.mask && echo 'www-client/firefox -screencast' >> /etc/portage/profile/package.use.mask/firefox

mkdir -p /etc/portage/package.use && echo 'www-client/firefox screencast' >> /etc/portage/package.use/firefox
OpenSuse (Tumbleweed) chromium Yes Pipewire 0.3 Patch
firefox Patched in devel project Pipewire 0.3 Patch
Patched in mozilla:Factory. Patch in openSUSE:Factory is currently in review.
Debian chromium No? Doesn't appear patched with build flag
firefox No? Doesn't appear patched with build flag

Electron

While Electron is built based on chromium, it does not build with the RTC_USE_PIPEWIRE=true flag set, so it currently does not work on any distro that we are aware of. There is an effort to build electron-ozone based on chromium-ozone, which will be a Wayland-native version of electron. The most recent builds of electron-ozone include this flag , but they are currently very unstable and will not be usable for most mainstream Electron apps (VSCode, MS Teams, Slack, etc.)

obs-xdg-portal

source: https://gitlab.gnome.org/feaneron/obs-xdg-portal/

xdg-desktop-portal-wlr should be perfectly compatible with obs-xdg-portal, but you should probably be using the wlrobs plugin instead. If you get errors regarding cursor modes, it is likely that you are not letting xdg-desktop-portal-wlr start automatically, or you are not starting it correctly with /usr/lib/xdg-desktop-portal -r & /usr/lib/xdg-desktop-portal-wlr

gnome-network-displays

source: https://github.com/benzea/gnome-network-displays

Unknown, needs testing.

xdp+gstreamer python script

source: https://gitlab.gnome.org/snippets/19

This is probably the simplest/most minimal test to ensure that xdg-desktop-portal-wlr screencasting is working correctly. If you're having issues elsewhere, try this first.

Clone this wiki locally