Remote Desktop using the RDP protocol for Plasma Wayland (2024)

With this blog I would like to introduce KRdp, which is a new library implementingthe required glue to create a server exposing a KDE Plasma Wayland session overthe RDP protocol. It also contains a command-line based serverwhich will allow remote clients to control the current Plasma Wayland session.

Video file

Remote Desktop Support for Wayland

With the increase in people working from home the past years and other remoteuse cases, it has become increasingly important to be able to control a runningcomputer remotely. While on X11 there are several existing solutions, forWayland the choices are rather more limited. Currently the only way of allowingremote control of a Plasma Wayland session is through Krfb, which uses VNC1for streaming to the client.

Unfortunately, VNC is not ideal, for various reasons. So to provide a betterexperience we started looking at other options, eventually settling on buildingsomething around the RDP protocol. Fortunately, because of the work done forKrfb and various other projects, we do have all the parts implemented to allowremote desktop control, the "only" thing left was to glue everything together.

Why RDP?

This raises the obvious question of "why use RDP?". There were several thingswe considered when starting with this. From the start, we knew we wanted tobuild upon something pre-existing, as maintaining a protocol takes a lot oftime and effort that are better spent elsewhere within KDE. Especially becausea custom protocol would also mean maintaining the client side. Both VNC and RDPhave many existing clients that can be used, which means we can focus on theserver side instead.

Image

Remote Desktop using the RDP protocol for Plasma Wayland (1)

Another major consideration is performance. VNC sends uncompressed images ofthe full screen over the wire, which means it requires a lot of bandwidth andperformance suffers accordingly. While I have seen some efforts to change this,they are not standardised and it is unclear what clients would support those.RDP, on the other hand, has a documented extension called the "GraphicsPipeline" that allows using H.264 to compress video, greatly reducing theneeded bandwidth.

The main drawback of RDP is that it is owned by Microsoft and developed for theneeds of Windows. While a potential problem, the protocol isopenly documented and, equally important for us, there is an extensiveopen-source implementation of both server and client side of the protocol inthe form of FreeRDP. This means we do not need to bother with the details ofthe protocol and can instead focus on the higher level of gluing everythingtogether.

While I am talking about client support and performance since those were someof our main considerations, RDP has many more documented extensions that, longterm, would allow us to greatly enhance the remote desktop experience by addingfeatures such as audio streaming, clipboard integration and file sharing.

Other Considerations

While the protocol was one major thing that needed to be considered for a goodremote desktop experience, it was not the only part. As mentioned, wetechnically have all the pieces needed to enable remote desktop, but some ofthose pieces needed some additional work to really shine. One example of thisis the video encoding implemented in KPipeWire.

Image

Remote Desktop using the RDP protocol for Plasma Wayland (2)

During development of KRdp it became clear that using pure software encodingwas a bottleneck for a responsive remote desktop experience. We tried severalthings to improve its performance, but ultimately concluded that we would needto use hardware encoding for the best experience. This resulted in KPipeWirenow being able to use VA-API for hardware accelerated video encoding, whichnot only benefits KRdp but also Spectacle once it is released with KDE Plasma 6.

Another part is the KDE implementation of the FreeDesktop Remote Desktopportal. While it would be possible to directly communicate with KWin to requestremote input and a video stream, we preferred to use the portal so that itwould be possible to run KRdp from within a sandboxed environment. However, thecurrent implementation is fairly limited, only allowing you to choose to acceptor reject a remote desktop request. We are working on adding some of the samefeatures to the remote desktop portal as are already available for thescreencasting portal. This includes screen selection and remembering thesession settings.

KRdp

So all that leads us back to KRdp, which is a library that implements the glueto tie all these parts together to allow remote desktop using the RDP protocol.It uses the FreeDesktop Remote Desktop portal interface to request a videostream and remote input from KWin, uses KPipeWire to encode the video streamto H.264 and FreeRDP to send that to a remote client and receive input from thatclient. The long term goal is to integrate this as a system service into KDE Plasma,with a fairly simple System Settings page to enable it and set some options.

Trying it Out

For those who want to try it out, we are releasing an alpha as a Flatpak bundlethat can be downloaded from here. This Flatpak, when run usingflatpak run org.kde.krdp -u {username} -p {password} will start a serverand listen for incoming connections from remote hosts. See the readme for moredetails and known issues. The Flatpak bundle was built from this code.If you encounter any other issues, please file them at bugs.kde.org.

Discuss this blog post at discuss.kde.org.

  1. While strictly speaking the protocol used by VNC is called RemoteFramebuffer or RFB, VNC is the general term that is used everywhere, so that iswhat I am using here as well.

Remote Desktop using the RDP protocol for Plasma Wayland (2024)

FAQs

What is the Remote Desktop Protocol RDP connection? ›

The Remote Desktop Protocol (RDP) is a protocol, or technical standard, for using a desktop computer remotely. Remote desktop software can use several different protocols, including RDP, Independent Computing Architecture (ICA), and virtual network computing (VNC), but RDP is the most commonly used protocol.

How to remote into KDE Plasma? ›

Open RDP service on your local machine. Then, input your Linux Ubuntu server IP in the Computer field and click Connect. Then, you can see the RDP login interface. Enter your Linux server login username and password and click OK.

What is plasma Wayland? ›

Plasma is the desktop provided by the KDE project, one of the largest and most successful open source initiatives in the world. Wayland is the successor of X11 for Unix desktops and the future for many reasons, including security and privacy.

How to connect using RDP from Linux? ›

How to RDP from Linux to Windows?
  1. Step 1: Install an RDP Client. Begin by installing an RDP client on your Linux system. ...
  2. Step 2: Launch the RDP Client. Once installed, launch the RDP client. ...
  3. Step 3: Add a New Connection. ...
  4. Step 4: Configure Connection Settings. ...
  5. Step 5: Input Credentials. ...
  6. Step 6: Save and Connect.
Mar 15, 2024

How do I connect to remotely using RDP? ›

Set up the PC you want to connect to so it allows remote connections:
  1. Make sure you have Windows 10 Pro. ...
  2. When you're ready, select Start > Settings > System > Remote Desktop, and turn on Enable Remote Desktop.
  3. Make note of the name of this PC under How to connect to this PC.

Is remote desktop the same as RDP? ›

Remote desktop services (RDS) and remote desktop protocol (RDP) are two terms that are often used interchangeably. However, they are not the same thing. RDP is a protocol that allows users to connect to a remote desktop, while RDS is a suite of tools that enables remote access to desktops and applications.

What is the difference between VNC and RDP? ›

Both protocols provide access to remote desktops for quick and easy remote working and troubleshooting. The main difference is that RDP is a virtual session and VNC captures the physical display; you see exactly what the remote user sees.

What is the desktop manager for KDE Plasma? ›

SDDM serves as the default display manager for the KDE Plasma desktop environment. It's created for simplicity, speed, and visual appeal.

How does KDE Connect connect? ›

KDE Connect uses Transport Layer Security (TLS) encryption protocol for communication. It uses SFTP to mount devices and to send files.

How do I start plasma Wayland from command line? ›

To start a Plasma on Wayland session from a console, run /usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland [1]. To start Plasma with xinit/startx, append export DESKTOP_SESSION=plasma and exec startplasma-x11 to your .xinitrc file or run directly in the console startx /usr/bin/startplasma-x11 .

What is the difference between plasma Wayland and X11? ›

Wayland does not implement all functions of the X server for security reasons. For example, Wayland does not support the network transparency familiar from X11, which enables functions such as screen recording and screencasting.

Is Wayland on KDE good? ›

It's more responsive than X11. It's a subtle difference, but real. Interacting w/Wayland is smooth & fluent in a way X11 never is (though you do get used to X11's punchiness, and it's easy to stop noticing it if you aren't switching back & forth to Windows or macOS.) Thank you KDE developers!

What is the command to connect to RDP? ›

MSTSC is the command that you need to use to open Windows Remote Desktop in the command prompt. You can type MSTSC directly in to the search box on Windows 10 (or click on Start > Run in earlier Windows versions). You can also use the MSTSC command directly from the command line as well.

How to connect RDP using IP and port? ›

Go to the Start menu and click on Run. On the Run menu type MSTSC and click Enter. In the RDP window, in the Computer box, scroll to the computer name or IP to which you wish to connect. Add a “:Port” (without the quotes) where “Port” is the decimal value of the destination port.

How to connect RDP via ssh? ›

To start an RDP session, or connect to an existing one:
  1. Open a terminal (on MacOS or Linux) or cmd (on Windows 10 1809 or later), and type ssh myutorid@rdp1.teach.cs.toronto.edu -L3388:localhost:3389. ...
  2. When prompted, log in using your Teaching Labs password.
  3. Once logged in, leave the ssh session running; don't exit.

Can I uninstall remote desktop connection? ›

Uninstall Remote Desktop Connection

From the Start menu, search for the Settings app and open it. Select Apps, then select Installed apps. Find or search for Remote Desktop Connection, select the three dots to the right-hand side, then select Uninstall. Confirm you want to uninstall the app by selecting Uninstall.

What is the RDP file for Remote Desktop Connection? ›

Remote Desktop Protocol (RDP) is used to connect two computers over a network. In an RDP setup, a computer running RDP client software, or the client, connects to another computer running RDP server software, or the server. The client computer creates an RDP file for storing the connection settings to the server.

What connection does remote desktop use? ›

A Remote Desktop server allows users to work from any location – at home, on the road, or in the office. A network connection is not required. There is no additional hardware needed to link the remote user to the server. All that is needed is access to the Internet and a web browser.

What is the difference between RDP and VPN? ›

RDP is designed for managing a remote desktop, essentially giving you control from a distance. In contrast, a VPN ensures the security of your connection while also masking your true location, creating the illusion that you're connecting from a different server location.

Top Articles
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 6272

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.