Bug 458191 - KRFB on Wayland, Have to confirm "Select what to share" and "New connection" even if you select "Enable Unattended Access"
Summary: KRFB on Wayland, Have to confirm "Select what to share" and "New connection" ...
Status: CONFIRMED
Alias: None
Product: krfb
Classification: Applications
Component: general (show other bugs)
Version: 22.04.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: George Goldberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-23 04:48 UTC by nl.smart
Modified: 2024-04-27 04:56 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nl.smart 2022-08-23 04:48:47 UTC
SUMMARY
***
I have to confirm the share screen on the devices running krfb on Wayland.
"Select what to share" and "New connection" pop-up's appear on the shared desktop screen, even if I select "Enable Unattended Access" with krfb on Wayland.
***

STEPS TO REPRODUCE
1. In system settings -> startup and shutdown -> Login Screen (SDDM) -> Behaviour -> automatically login with session Plasma (Wayland)
2. In system settings -> startup and shutdown -> Autostart -> add krfb
3. Launch krfb and Select "Enable Unattended Access" to allow the unattended Access.
http://corky47.free.fr/ASSET/IMG/WEB/2022.08.15_KRFB_Wayland_Enable_Unattended_Access.png
4. Reboot your device.

OBSERVED RESULT
On boot device I have to allow the access to the remote computer even if I selected "Enable Unattended Access" running krfb on Wayland, those 2 pop-up's appears on screen :

Select what to share :
http://corky47.free.fr/ASSET/IMG/WEB/2022.08.15_KRFB_Wayland_Select_what_to_share.png

New connection :
http://corky47.free.fr/ASSET/IMG/WEB/2022.08.15_KRFB_Wayland_New_connection.png

EXPECTED RESULT
Remote the computer sharing a desktop with krfb on Wayland without to click on the pop-up's "Select what to share" and "New connection".

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.96
Qt Version: 5.15.5

ADDITIONAL INFORMATION

============

KDE KRFB Wayland : Select what to share / New connection

Hi,

I'm very pleased & thankful for your effort.

Krdc and krfb are 2 nice kde product, with a fully GUI configuration !

2 new features appears with krfb on Wayland, "Select what to share" and "New connection", good idea to improve the remote computer security, but not practice for a home usage and remote the x86 or arm devices build for home server without screen, keyboard and mouse.

With "Select what to share" and "New connection", I have to confirm the share screen, but I can't because no screen, mouse and keyboard are plugged on my devices running krfb on Wayland. Same issue on arm devices running Wayland.
X11 don't provide those features, I start krfb on X11 with the Autostart software on startup and then I remote with krdc the devices sharing their desktop with krfb on X11, really simple and practice.

How to avoid those new krfb Wayland features ? I mean the pop-up's showing "Select what to share" and "New connection".

Is it a krfb on Wayland bug ? which don't take the function "Enable Unattended Access", no issue like this with krfb on X11.

It will be great to use fully Wayland on the devices I manage with krfb.
As you know some Linux distro are now fully using Wayland.

Thanks for reading this post, no problem to provide more info, I stay tune.

edit : no problem with krdc on Wayland to remote windows 7 and 10 devices (windows vnc sharing server -> ultra vnc 1.3.8.1)
       no problem to remote a x86 Linux device sharing desktop with krfb on Wayland, the Linux device is remote with an android vnc viewer => bVNC Secure VNC Viewer 5.1.0


pamac info krdc
Name                  : krdc
Version               : 22.04.3-1

pamac info krfb
Name                  : krfb
Version               : 22.04.3-1
Description           : Desktop Sharing

pamac info wayland
Name                  : wayland
Version               : 1.21.0-1
Comment 1 nl.smart 2022-11-27 09:35:27 UTC
Hi,

unfortunately krfb + wayland doesn't work for months now.

Please add a function to disable the share function pop up on start with krfb, the last issue with this function is the crash of the device, the desktop is block after select it, the screen freeze.

http://corky47.free.fr/ASSET/IMG/WEB/2022.08.15_KRFB_Wayland_Select_what_to_share.png
Comment 2 nl.smart 2022-11-27 10:02:12 UTC
I forgot with the last post

KDE plasma version 5.26.3
KDE frameworks version 5.99.0
Qt version 5.15.7
kernel 5.15.78-1

krfb 22.08.3-1
Comment 3 Henrik Harmsen 2022-12-07 10:27:56 UTC
I also had problems with this. Then I set different passwords for attended vs unattended access. If I use the password for unattended access it worked ok. Could you try that?

I think krfb for wayland is broken due to https://bugs.kde.org/show_bug.cgi?id=451086 
I could only get krfb working on KDE by using the xcb and X11
Comment 4 nl.smart 2022-12-07 18:27:07 UTC
Hej Hej, 

Thanks for your message, and the tips.

The unattended access password is working, because I set krfb with the xcb !
Thanks a lot for your help, it works !

Unfortunately, I did a test with wayland activated on the shared device, krfb and the desktop environment crash when I select ok on the pop up "Select what to share"
Comment 5 Stéphane Tréboux 2023-10-12 16:51:05 UTC
I observe the same issue after updating from Kubuntu 23.04 (lunar, 4:22.12.3-0ubuntu1) to Kubuntu 23.10 (mantic, 4:23.08.1-0ubuntu1).
When using Wayland, with each start krfb needs local interaction to grant access to the screen and input devices, even if "Enable Unattended Access" is ticked.
Another way to put it is that "Enable Unattended Access" stays ticked but does effectively nothing (it does not enable unattended access).
This does not happen with X11.
This is a problem for remote machines without physical access.
Comment 6 nl.smart 2023-10-16 06:23:55 UTC
 Hi,

Thanks for your report, you are welcome to confirm this issue on the new kde forum.

https://discuss.kde.org/t/krfb-on-wayland-have-to-confirm-remote-control-requested/2650
Comment 7 nl.smart 2024-03-09 10:13:29 UTC
Hi,

KDE 6 is alive, congratulations to the dev !

So, I did a test with krfb on wayland, I have to confirm the share screen on the devices running krfb on Wayland.

I hope soon a solution :-)

KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.6.21-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Celeron® J4105 CPU @ 1.50GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 600

[nls@ody ~]$ krfb --version
krfb 24.02.0
[nls@ody ~]$

Edit : I found a bug on KDE 6, my taskbar is on the top screen, can’t access to the settings by doing enter edit mode, the settings windows are superimpose, see below the screenshot

https://discuss.kde.org/t/krfb-on-wayland-have-to-confirm-remote-control-requested/2650/7
Comment 8 nl.smart 2024-04-27 04:56:42 UTC
Hi,

Someone on KDE discuss wrote a patch to solve this issue, thanks a lot to him for his help, not tested, I'm not dev.

Find below  the KDE discuss link

https://discuss.kde.org/t/krfb-on-wayland-have-to-confirm-remote-control-requested/2650/9

Find below the code to solve the issue

diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp
index 9c27b10..100d6f3 100644
--- a/src/remotedesktop.cpp
+++ b/src/remotedesktop.cpp
@@ -136,10 +136,6 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
         Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
         Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
         connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
-
-        if (!remoteDesktopDialog->exec()) {
-            return 1;
-        }
     }
 
     if (session->screenSharingEnabled()) {

The code for Nixos

nixpkgs.overlays = [(final: prev:
    {
      libsForQt5 = prev.libsForQt5.overrideScope (final: prev:
      {
        plasma5 = prev.plasma5.overrideScope (final: prev:
        {
          xdg-desktop-portal-kde = prev.xdg-desktop-portal-kde.overrideAttrs (prev:
            { patches = (prev.patches or []) ++ [ ./krfb.patch ]; });
        });
        xdg-desktop-portal-kde = final.plasma5.xdg-desktop-portal-kde;
      });
    })];

I hope it will be helpfull to solve it :-)