Make screenshare work in wayland

(under Archlinux/sway) ..

Packages to install:

  • xdg-desktop-portal
  • xdg-desktop-portal-wlr
  • optionally wireplumber

ENV to set:

export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM=wayland

# or put this in sway config 
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway

Programs to run

pipewire
/usr/lib/xdg-desktop-portal-wlr -p BGRx 
/usr/lib/xdg-desktop-portal
wireplumber