You are not logged in.
I'm creating this topic to register how to make screensharing work with Wayland and River as of January 2025. All topics I could find about screensharing in Wayland are a bit outdated and do not direct to an easy working answer.
1. Make sure xdg-desktop-portal, xdg-desktop-portal-gtk and xdg-desktop-portal-wlr are installed:
sudo pacman -S xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-wlr
2. Contrary to what you may find in older topics, it's not necessary to install pipewire-media-session, since wireplumber is working just fine now.
3. Add the following code to your .config/river/init:
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river
systemctl --user restart xdg-desktop-portal
- If screensharing is not working, make sure xdg-desktop-portal services are running:
systemctl --user status xdg-desktop-portal.service
systemctl --user status xdg-desktop-portal-gtk.service
systemctl --user status xdg-desktop-portal-wlr.service
- Check if the environment variables are set for systemd:
systemctl --user show-environment
You should find somenthing like:
WAYLAND_DISPLAY=wayland-1
XDG_CURRENT_DESKTOP=river
- You can also try to stop the xdg-desktop-portal service and run manually to see if it works:
systemctl --user stop xdg-desktop-portal
XDG_CURRENT_DESKTOP=river /usr/lib/xdg-desktop-portal
- Test it using https://mozilla.github.io/webrtc-landing/gum_test.html
Properly setting the env variable prior to xdg-desktop-portal service start was the main issue I was having to make it work.
Hope this helps!
Last edited by rasevero (2025-01-09 13:35:30)
Offline
Please don't create presolved howto topics on the boards were it will invariably drown. Such information belongs to the wiki where it can be properly maintained, you should add this there.
Offline
Added this howto to https://wiki.archlinux.org/title/River
Offline