Created attachment 168109 [details] Remote Desktop + Share screen script SUMMARY RemoteDesktop + ScreenCast dbus interfaces is resulting in different behavior depending on KDE version. On 5.24 when I run the script I got a screen selection dialog that I can select the screen with the input sharing permissions checkbox, but on 5.27+ only appear a dialog saying that will share screens and input, without checkbox or screen selection. So on 5.27+ it auto selected the monitor/screen that will be shared. This behavior start to be a problem when you are using 2 or more monitors with the ScreenCast.selectSources multiple option as false, in this case, the selected auto shared monitor is the option “Full workspace” as in the regular screen share portal. And will end up with 2 or more streams showing the full workspace on each stream instead one monitor/screen on each stream. STEPS TO REPRODUCE 1. Run the shared script (python dbus_rd_screen_cast.py) 2. If KDE 5.24 select the monitor/screen that you want to share, if KDE 5.27+ just press the share button OBSERVED RESULT On 5.24 when I run the script I got a screen selection dialog that I can select the screen with the input sharing permissions checkbox, but on 5.27+ only appear a dialog saying that will share screens and input, without checkbox or screen selection. So on 5.27+ it auto selected the monitor/screen that will be shared. EXPECTED RESULT KDE 5.27+ should keep the behavior of selecting monitor/screens as it's on gnome. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 23.10 KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 ADDITIONAL INFORMATION Check my scripts and how to reproduce this bug on: https://discuss.kde.org/t/remote-desktop-session-with-share-screen-behavior-change/13489/1
Seems to still be the issue. Related to: https://github.com/TigerVNC/tigervnc/issues/2025
I found two commits that *might* be related [1, 2], seems like they were introduced in 5.27. Not sure what is going on here, I added a debug print in remotedesktop.cpp.continueStart() to print how many screens there are (WaylandIntegration::screens().count()). On a 2 monitor desktop, and the parameter multiple=true in ScreenCast.SelectSources() I do get an expected 2 screen count, but I only get 1 stream in my response containing both screens. The screen chooser dialog shows up correctly when using the ScreenCasting portal, where you can either choose one screen or the entire workspace. It would be nice if the behaviour was similar when using the RemoteDesktop portal. [1] https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/5c5a0993a40470fbf0c5c292128d1932480fce8c [2] https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/4f206276139598271809e099aa7f2f1ca8d2f1f9