Remote Desktop using the RDP protocol for Plasma Wayland

So, is this “virtual monitor” the same thing as “wireless display” as in https://askubuntu.com/questions/1017249/samsung-tv-mirror-screen ? (I think it’s miracast?)

If it’s different thing, is there then any plans to add support for casting a KDE/plasma desktop wirelessly to a smart-TV?

KRdp handles this slightly differently due to this - it will ask for remote desktop permissions on startup and then reuse that for each incoming connection. That said, it is a workaround for lacking persistence in xdg-desktop-portal, which was recently addressed upstream. Once the KDE implementation also supports this, you’d have the option of remembering the permission.

1 Like

I don’t have any plans for that myself. As far as I know, the wireless display stuff is mired in proprietary protocols and closed source implementations. I seem to recall there is an open source alternative to Chromecast at least, but don’t know the status of that.

Hi,

thanks for your answer, you mean it will be solve in the future? nice :slight_smile:

for the moment I unfortunately don’t use wayland on my devices due to the problem I explain in my detailed post, the "Remote control requested” pop up on start with the share devices

I ssh the devices with Konsole, for sure, but for some software you can’t only ssh the devices, you have to remote the devices with a vnc software.

krdc and krfb are 2 nice softwares, well design, UI and UX are good, congratulations.
No problem to remote a windows or android device with krdc.
No problem to share you desktop with krfb and remote your linux device with a windows or android remote software.

I am having some trouble getting it work on arch right now but i guess it is to be expected since it’s still in alpha.

One question, will this support unattended access in the future?
Like the xrdp service, which starts on system boot and creates it’s own “hidden” session when you connect.

1 Like

I’ve been testing it on Arch myself, so it should work there, any specific issue you’re running into?

One question, will this support unattended access in the future?

This has been asked before and will be something we will look into at some point. It’s not going to be easy as it will most likely also require login manager integration, so don’t expect it to arrive soon.

2 Likes

Hmm i guess it was a problem with the client. wlfreerdp gives me an empty window, thincast (flatpak) does not work, but remmina (pacman) works until it stops working with this error reported by krdp:

14:44:21:647] [2:43] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_ACTIVE - peer_recv_pdu() fail
[14:44:21:647] [2:43] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
org.kde.krdp: Unable to check file descriptor
org.kde.krdp: Closing session

Good to know that it’s in the plans. Unfortunately i need unattended access and the option to show the lock screen when connected for this to be viable for me.

Still I am very happy that RDP support is being worked on.
Thank you for your hard work, looking forward to future developments.

wlfreerdp in general is not in a great state, for me it starts with a size of 0x0 and resizing it makes it crash. So I tend to use xfreerdp instead, which works fine.

Hi. When i run
" flatpak run org.kde.krdp -u {username} -p {password}"
I have
Could not find certificate and certificate key, generating temporary certificate…
Temporary certificate generated; ready to accept connections.
org.kde.krdp: Initializing Freedesktop Portal Session
org.kde.krdp: Unable to listen for connections on QHostAddress(“”) 0
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “/org/freedesktop/portal/desktop” interface “org.freedesktop.portal.Remo
teDesktop” member “NotifyKeyboardKeycode”: Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service “org.freedesktop.portal.Desktop” path “” interface “org.freedesktop.portal.Session” member “Close”: Object pat
h cannot be empty
org.kde.krdp: Closing Freedesktop Portal Session

org.kde.krdp: Unable to listen for connections on QHostAddress(“”) 0

Seems like it’s not allowed to listen on the required address/port, make sure the flatpak’s permissions are correct. It will try to listen on the IP address 0.0.0.0, or in other words, all interfaces, port 3389 by default.

Will a head-less non-shadowed session use case be supported?

By default on XRDP and on Windows, a remote session does not have to be locally authenticated. When a remote user connects, they are presented with a login screen and afterwards any other sessions by that user are disconnected including the local session. RDP of course also supports shadowed sessions where both the remote and local screens are synchronized.

With both KDE and Gnome deciding to use RDP instead of RFB (VNC) for remote desktop connectivity on Wayland, I see however that both are implementing it in a shadowed approach. This mirrored approach is more typical of VNC solutions.

Will behavior similar to XRDP and Windows be supported in the future?

Super pumped that KRDP is in alpha! Looking forward to a great product. Thank you for the hard work!
I have fresh installed Kubuntu (23.04) and Arch in HyperV VMs and tried to install the flatpak file I downloaded using the listed command:

flatpak --user **--install** krdp-alpha-20230808.flatpak to which I receive:
error: ‘Downloads/krdp-alpha-20230808.flatpak’ is not a flatpak command. Did you mean ‘–installation’?

So I’m assuming that the command should be:
flatpak --user **install** krdp-alpha-20230808.flatpak
To which I receive:
error: The application org.kde.krdp/x86_64/master requires the runtime org.kde.Platform/x86_64/6.5 which was not found

Both distros result in the same error.
Was hoping you could point this novice in the right direction to solve this error.

Edit: Solution =

flatpak install org.kde.Platform/x86_64/6.5

Got confused since

flatpak search org.kde.Platform/x86_64/6.5

results in
No matches found

I think you might be running into some of the funkyness of the flatpak command syntax…I had to trial and error it myself, but I think for installing and searching, you would need to leave off the architecture and version info and just use org.kde.Platform…see my searching attempts below:

host:~> flatpak search org.kde.Platform/x86_64/6.5
No matches found
host:~> flatpak search org.kde.Platform
Name                                     Description                                                                         Application ID                                            Version            Branch                Remotes
KDE Application Platform                 Shared libraries used by KDE applications                                           org.kde.Platform                                                             6.5                   flathub
KDE Application Platform                 Shared libraries used by KDE applications                                           org.kde.Platform                                                             5.15-22.08            flathub
KDE Application Platform                 Shared libraries used by KDE applications                                           org.kde.Platform                                                             5.15-21.08            flathub
QtSNI                                    A Qt platformtheme plugin that offers a flatpak-compatible SNI tray icon            org.kde.PlatformTheme.QtSNI                                                  5.15-21.08            flathub
QtSNI                                    A Qt platformtheme plugin that offers a flatpak-compatible SNI tray icon            org.kde.PlatformTheme.QtSNI                                                  5.15                  flathub
QtSNI                                    A Qt platformtheme plugin that offers a flatpak-compatible SNI tray icon            org.kde.PlatformTheme.QtSNI                                                  5.12                  flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         6.5                   flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         6.4                   flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         6.3                   flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         6.2                   flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         5.15-22.08            flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         5.15-21.08            flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         5.15                  flathub
QGnomePlatform                           Qt Platform Theme aimed to accommodate GNOME settings                               org.kde.PlatformTheme.QGnomePlatform                                         5.12                  flathub
Maliit plugin for SailfishOS             Keyboard plugin used in Sailfish OS for Flatpak applications                        org.kde.PlatformInputContexts.MaliitSailfishOS                               5.15-22.08            flathub
Maliit plugin for SailfishOS             Keyboard plugin used in Sailfish OS for Flatpak applications                        org.kde.PlatformInputContexts.MaliitSailfishOS                               5.15-21.08            flathub
Maliit plugin for SailfishOS             Keyboard plugin used in Sailfish OS for Flatpak applications                        org.kde.PlatformInputContexts.MaliitSailfishOS                               5.15                  flathub
Maliit plugin for SailfishOS             Keyboard plugin used in Sailfish OS for Flatpak applications                        org.kde.PlatformInputContexts.MaliitSailfishOS                               5.12                  flathub

I have the same result when issueing the krdp command. I have set permissions for krdp using flatseal i.e. granting permissions for dbus. I have no firewall installed. Could the problem be that my vmconnect session has port 3389 already open? If not any hints on what permissions should be available and/or other ways I might be able to troubleshoot the problem. Thanks

Could the problem be that my vmconnect session has port 3389 already open?

Oh that is quite likely to be the cause then yes. Try passing some other port using --port to the flatpak run command and see if connecting on that port works.

Thanks - I’ll give it a try. . .

Thanks John - good to know!

–port 3399 worked, but:

run org.kde.krdp —port 3399 -u victor -p v
Could not find certificate and certificate key, generating temporary certificate
Temporary certificate generated; ready to accept connections.
org.kde.krdp: Initializing Freedesktop Portal Session
org.kde.krdp: Listening for connections on QHostAddress(QHostAddress ::Any) 3399
org.kde.krdp: Could not start screencast session, error code 2
org.kde.krdp: Closing Freedesktop Portal session

However running the krdp command again gives me:

Yay! Trying VMConnect with port 3399 now. . .

Freedesktop Portal Session is Initialized and Listening on 3399 is successful but after receiving the following and clicking Share it all crashes with error 2.

What to chase next? Logs to check (maybe XDG-Portal)?

So glad I found this thread, got stuck with the blog instructions!

So far:

flatpak install org.kde.Platform/x86_64/6.5
flatpak --user install krdp-alpha-20230808.flatpak
flatpak run org.kde.krdp  --port 3399 -u joe -p hunter2

results in:

Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Qt: Session management error: Could not open network socket
Could not find certificate and certificate key, generating temporary certificate...
Temporary certificate generated; ready to accept connections.
org.kde.krdp: Initializing Freedesktop Portal Session
org.kde.krdp: Listening for connections on QHostAddress(QHostAddress::Any) 3999
org.kde.krdp: Could not open a new remote desktop session, error code 2
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyKeyboardKeycode": Marshalling failed: Invalid object path passed in arguments
qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "" interface "org.freedesktop.portal.Session" member "Close": Object path cannot be empty
org.kde.krdp: Closing Freedesktop Portal Session

I’m assuming something flatpak rights related, now sure how to adjust?

Going to follow this, hopefully it progresses quickly! Trying to get Krfb & KRDC working, but can’t been able to, so hoping this will.

I presume that KRDC with RDP protocol could be used? Or is there a better RDP client that should be used?