Solved Screen sharing in KDE Plasma Wayland session

I am yet to get screen sharing to work in KDE plasma wayland session. Tried it with both firefox and chromium. It initially complains about missing pipewire and after running pipewire in konsole, the browser does offer the options to choose what to share (entire desktop, a selected window, a screen region, etc.) and a red dot appears in the taskbar indicating pipewire is recording (?) the screen. However, no screen is shared to the browser.

Am I missing some setting/configuration? I switched to plasma X11 session for now where screensharing works as expected, but I am keen to go back to wayland which feels more responsive than the X11 session. I am running FreeBSD 15.1-RELEASE-p4, with KDE plamsa 6.7.5. My firefox is version 157.0.1,2 and chromium is 151.0.7922.137_2.
 
you could try something like this

Code:
sudo pkg install plasma6-xdg-desktop-portal-kde

check where plasma6-xdg-desktop-portal-kde is installed
it should be in /usr/local/libexec/

start pipewire
the xdg-desktop-portal and plasma desktop portal

Code:
pipewire &
/usr/local/libexec/xdg-desktop-portal -r &
/usr/local/libexec/plasma6-xdg-desktop-portal-kde -r &

then start firefox or chromium and see if it works

here are my notes on setting up Pipewire with dwl and Wayland wlroots

 
Thanks NapoleonWils0n, for the recommendations.

I have xdg-desktop-portal and plasma desktop portal installed and running them as you advised unfortunately gives the same result - a red dot appears in task bar with a tool tip (screenshot below), however, the browser does not share the screen. The red dot gives an option to 'end' casting and when I click it, browser complains that it needs permission to share screen, so something seems to be happening while the red dot is present, despite no screen actually being shared.

1791725913651.png
1791725999473.png


I also noticed now that Firefox gives options to share its open tabs and this works fine even without pipewire running. Choosing to share the screen through 'Use operating system settings' (screenshot below) is what fails to work. So I am able to share other open tabs in firefox, but not other windows, entire screen, etc.

1791726972735.png
 
Looks like I may have solved my problem.

Previously, I did not have multimedia/wireplumber installed. After installing 'wireplumber', screen sharing works after manually starting 'pipewire' in konsole. I don't mind starting it manually, but is it desirable to auto-start it? If so, can anyone please suggest the correct way to do it?

Also, as screen sharing/recording is a fairly common use case and if 'pipewire + wireplumber' is a dependency for this in wayland, wouldn't it be nice to have both these packages installed as dependency in KDE plasma (I think pipewire is already installed as a dependency by 'plasma6-plasma') ?
 
Back
Top