Remote Desktop using the RDP protocol for Plasma Wayland

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?

At the moment, KRDC doesn’t work out of the box as it doesn’t enable graphics pipeline. You can fix that by adding /gfx in the “extra options” setting though (Or /gfx:AVC420 if just /gfx doesn’t work).

We are working on an updated RDP plugin for KRDC so that setting this manually is no longer needed.

As in doesn’t work out of the box with this new KRDP? Gotcha.

Hm. Can you start up KRDP from ssh command line? Or does it need to be started from within a Wayland session?

So thought I was having issues connecting, turns out I forgot that the instance starts up with a user/pass as variables, and I kept trying my regular user login user/pass. Whoops!

Remmina works great, sadly KRDC doesn’t yet, but since Remmina does I’m not going to futz with KRDC to try and get that working.

Is authenticating to login as the current user on the roadmap?

How hard would it be to allow connections to a locked session without unlocking the displays (and keyboard/mouse)? I know that’s not that common of a feature, but would be very useful for people like me that have a workstation at work they need to remote into from home or meeting rooms.

3 Likes

Yes, I definitely need this. Unless there’s some easy way to unlock the screen from the command line, before I end up connecting.

TeamViewer type functionality is really what I’m looking for, in terms of remote desktop connecting/logging in.

1 Like

This is what I was asking about here .

Both Plasma and Gnome are currently implementing RDP in a way (from a user interaction POV) that is unlike what RDP users are accustomed with and more similar to VNC, ChromeRemoteDesktop, TeamViewer and others.

For a more typical interaction, I think this might be needed: Restarting · Wiki · Plasma / KWin · GitLab

Maybe there can even be some code sharing between the RDP deamon and SDDM.

1 Like

@ahiemstra so it’s been a while, haven’t seen any updates via flatpak, just trying to see if there’s any movement on this. Especially being able to connect and remote unlock the screen to be able to use it, and then re-lock once disconnected.

1 Like

You’ve disabled me in your preferences. You need to allow new user onboarding tips to interact with me.

Great project! Seems like the way to go on Ubuntu 22 running the default wayland.

Here’s what worked on Ubuntu 22 since the blog doesn’t seem to work.

First, install flatpak since it doesn’t come with ubuntu 22:

$ apt install flatpak

Then, try installing the application.

$ wget https://download.kde.org/unstable/krdp/krdp-alpha-20230808.flatpak
$ flatpak install --user krdp-alpha-20230808.flatpak

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/ryan/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

error: The application org.kde.krdp/x86_64/master requires the runtime org.kde.Platform/x86_64/6.5 which was not found

To fix this error, none of the above recommendations worK

$ flatpak install org.kde.Platform/x86_64/6.5

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/ryan/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…
error: No remote refs found similar to ‘org.kde.Platform/x86_64/6.5’

To fix this, seems like you need to add a remote, since flatpak doesn’t come with any by default. debian - Getting this error when trying to use flatpak, “No remote refs found similar to ‘flathub’” - Super User

$ flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Now, retry install of kde Platform

$ flatpak install org.kde.Platform/x86_64/6.5

Finally, install krdp:

$ flatpak install --user krdp-alpha-20230808.flatpak

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/ryan/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.


org.kde.krdp permissions:
    ipc     network     wayland     x11     devices     file access [1]     dbus access [2]     tags [3]

    [1] home:ro, xdg-config/kdeglobals:ro
    [2] com.canonical.AppMenu.Registrar
    [3] nightly


        ID                    Branch         Op         Remote               Download
        ID                    Branch         Op         Remote               Download
 1. [✓] org.kde.krdp          master         i          krdp1-origin         0 bytes

Installation complete.
1 Like

It appears that some progress was made on this on the Gnome side and it appears their solution integrates with GDM: Add a graphical remote login (!139) · Merge requests · GNOME / gnome-remote-desktop · GitLab

I think eventually KRDP will need equivalent functionality.
I do wonder if it would not be possible to implement this in a compositor and display manager agnostic way.

4 Likes

Hi,

more details and technicals comments…

2 Likes