// # Remote Desktop Protocol (RDP) is better than VNC, Virtual Box, QEMU, virt-manager, hyperv etc. # RDP features The RDP connection features that I need: * `RDP feature A. speed` The speed is so good, that I do most of my work via an RDP connection. Everything is snappy, even using an Integrated Development Environment (IDE). The freerdp command line parameter is "/network:lan". * `RDP feature B. copy/paste of plain text` * `RDP feature C. resize` Resizing the window of the freerdp RDP client changes the resolution of the RDP server. If you use the RDP client rdcman, resize the window of rdcman, then reconnect the RDP connection. The freerdp command line parameter is "/dynamic-resolution". * `RDP feature D. I can just connect from the RDP client computer` This feature is missing when a human needs to log into the graphical session on the RDP server computer. Or when a human needs to accept all incomming RDP connections. Other RDP connection features: * Sound. Sound is generated on the RDP server and can be heard on the RDP client. The freerdp command line parameter is "/sound:sys:pulse". * YouTube playback with almost acceptable speed and with sound. The freerdp command line parameter is "/video /rfx /gfx". * The home directory from the RDP client machine can be made available to the RDP server machine via Samba or Windows shares (the share named "\\\\tsclient"). The freerdp command line parameter is "+home-drive". * Copy/paste of files. Drag and drop of files between RDP client and RDP server. * Use less bandwidth e.g. by using a smaller resolution, by using a smaller number of bits for color per pixel. # Glossary * RDP is the Remote Desktop Protocol. https://en.wikipedia.org/wiki/Remote_Desktop_Protocol * freerdp - a free software RDP client, https://www.freerdp.com . Command line executables: wlfreerdp or xfreerdp. # 1. How to install and use an RDP server There are 4 RDP servers: xrdp and the RDP servers that are built into Windows (operating system), GNOME (desktop), KDE Plasma (desktop). # 1.1. GNOME >= 50, Ubuntu >= 26.04, Fedora Workstation >= 44 GNOME Settings app > System > Remote Desktop > "Remote Login" tab > enable checkbox "Remote Login", under the "Login Details" groupbox, set a user and password. You can use the Linux user name and the Linux user password. Probably remote sound is not implemented yet. Restart the computer. Screen recordings https://www.youtube.com/watch?v=oelT312LqFI , https://www.youtube.com/watch?v=xjfC4GGI7_w # 1.2. KDE Plasma >= 6.7 Screen recordings https://www.youtube.com/watch?v=2JkW3iYyDXE Let's say that "U" is the name of the user that you use for logging into KDE Plasma. Make sure that you are logged into KDE Plasma as user "U". Start the "System Settings" app > "Security & Privacy" > "Remote Desktop". Check the checkbox "U Login with your system password". Click on the "+ Add New..." button > "Username:" "U", "Password:" enter the password of the user "U". Turn on the checkbox "Autostart on login". Turn on the instant toggle "Enable RDP server". Click the "Apply" button. You can connect from an RDP client. E.g.: xfreerdp /u:.\\administrator /v:192.168.122.192 /video /rfx /network:lan /gfx You can change the KDE Plasma resolution to be e.g. the left half of your screen: kscreen-doctor -o # E.g. # Output: 1 Virtual-1 7530657f-8794-4e63-b8f4-ab83368f144a # In the output I can see that there is only one "Output" named "Output: 1". kscreen-doctor output.1.addCustomMode.960.990.60000.full # From "System Settings" > "Display Configuration" > "Resolution:" select "960 x 990". # Note: if you are connected via RDP, the mouse might not be calibrated (cusor is in place A but clicks happen in place B). Reconnect via RDP. The RDP connection speed is correct, copy paste of plain text works corectly. RDP feature summary: `RDP feature A. speed` OK, `RDP feature B. copy/paste of plain text` OK, `RDP feature C. resize` requires command line workaround, `RDP feature D. I can just connect from the RDP client computer` missing. # 1.3. RDP server xrdp Screen recordings https://www.youtube.com/@nmariusp/search?query=xrdp Linux and FreeBSD RDP server xrdp E.g. on FreeBSD if you cannot make your X server work correctly, e.g. small resolution. An alternative is to install xrdp. Note: on the RDP server, you should log out if you use X11 and you are connected via the computer's keyboard and mouse (aka Ctrl+Alt+F1, aka one of the 8 virtual consoles). Before connecting using an RDP client. RDP feature summary: `RDP feature A. speed` OK, `RDP feature B. copy/paste of plain text` OK, `RDP feature C. resize` OK, `RDP feature D. I can just connect from the RDP client computer` OK. ## Kubuntu >= 25.10 Screen recording https://www.youtube.com/watch?v=mVP_PFbVCdo sudo apt install plasma-session-x11 xrdp xorgxrdp ## Fedora KDE >= 43 Screen recording https://www.youtube.com/watch?v=c10rYXXE9lc sudo dnf install plasma-workspace-x11 sudo dnf install xrdp xorgxrdp # Edit file /etc/xrdp/xrdp.ini, uncomment the entire section "[Xorg]". sudo systemctl enable --now xrdp ## Arch Linux installed using archinstall, from archinstall select the KDE Plasma desktop. CachyOS, EndeavourOS with KDE Plasma installed from the OS installer Screen recording https://www.youtube.com/watch?v=qu6z-X_hngI , https://www.youtube.com/watch?v=NtOaWotMRms , https://www.youtube.com/watch?v=zKGC6ct2_3I If yay is not installed, such as in Arch Linux, install yay from AUR https://aur.archlinux.org/packages/yay https://wiki.archlinux.org/title/Arch_User_Repository : sudo pacman -S base-devel go git mkdir -p ~/work/aur ; cd ~/work/aur git clone https://aur.archlinux.org/yay.git cd yay makepkg sudo pacman -U yay*.pkg.tar.zst # E.g. yay-11.3.2-1-x86_64.pkg.tar.zst Then: # We need the KDE Plasma X11 session. sudo pacman -S plasma-x11-session # Reboot and log into the KDE Plasma X11 session. # As per https://wiki.archlinux.org/title/xrdp yay xrdp # Select option 1 to build and install xrdp. yay xorgxrdp # Select option 1 to build and install xorgxrdp. sudo systemctl enable --now xrdp cat /etc/X11/Xwrapper.config # Should say: allowed_users = anybody cat ~/.xinitrc # Should say: export DESKTOP_SESSION=plasma /usr/lib/plasma-dbus-run-session-if-needed startplasma-x11 ## openSUSE Tumbleweed Screen recording https://www.youtube.com/watch?v=AKIfsZao1u0 In the installer I have selected "Desktop with KDE Plasma", I have disabled the firewall and enabled the ssh server. I connect using ssh and run: sudo zypper install xrdp xorgxrdp sudo systemctl enable --now xrdp Edit the file /etc/xrdp/xrdp.ini and comment out all the lines starting with the line [Xvnc] and ending with the line before the line [Xorg]. Note: the line [Xorg] should not be commented out. This makes it such that when you connect using an RDP client app, the "Session" combobox has the correct item "Xorg" selected by default. If the KDE Plasma X11 session is not started automatically, create the file ~/.xinitrc with the content: startplasma-x11 ## FreeBSD >= 14.3 Screen recordings https://www.youtube.com/@nmariusp/search?query=freebsd%20xrdp I installed FreeBSD 14.3, see the FreeBSD chapter from [install-os.html](install-os.html) . pkg install xrdp xorgxrdp sysrc xrdp_enable="YES" sysrc xrdp_sesman_enable="YES" # Create file ~/startwm.sh with content: exec dbus-launch --exit-with-x11 ck-launch-session startplasma-x11 chmod +x ~/startwm.sh pkg install firefox # Restart the computer. # 1.4. Windows RDP server On the Windows operating system you can enable the RDP server. E.g. right click on Windows Start Menu > System > "Rename this PC (advanced)" > tab "Remote" > "Remote Desktop" groupbox > enable "Allow remote connections to this computer". On Windows Server without full GUI experience > sconfig.cmd. # 2. How to install and use an RDP client Possible RDP clients: freerdp started from the command line, GUI apps such as Remmina, the RDP client that is builtin to Windows (mstsc.exe), Microsoft SysInternals Suite (rdcman.exe), Android RDP clients. # 2.1. Linux and FreeBSD RDP client freerdp The name of the executable might be: wlfreerdp (Wayland app), xfreerdp (x server app), sdlfreerdp (SDL library app). Install from your operating system the binary package that contains that executable file. E.g. on Kubuntu >= 26.04 `apt install freerdp-x11`. Run: xfreerdp --help Note down any of the command line parameters that you might need. Use a command line like: # For FreeRDP >= 3: xfreerdp /u:.\\administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse # Here ".\\" represents the "domain" of the user "administrator". "." means the current computer as a domain. # Or for FreeRDP 2: xfreerdp /u:administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse When connecting to an xrdp RDP server, make sure that in the "Session" combo box "Xorg" is selected. Not something else such as "Xvnc". You can resize the freerdp RDP client window and the resolution of the RDP server will change correctly. Other interesting command line parameters: +home-drive # 2.2. Windows RDP client Open the app Remote Desktop Connection. Or install another RDP client e.g. "Sysinternals Remote Desktop Connection Manager" (rdcman.exe) https://en.wikipedia.org/wiki/Remote_Desktop_Protocol I prefer to use the app "Sysinternals Remote Desktop Connection Manager" (rdcman.exe) because I need the RDP client to have a window titlebar and window border, I can hide the menu, and after I resize the window, if I select to reconnect, the RDP server's resolution will be changed correctly. Video https://www.youtube.com/watch?v=YK1NHeQgjP8 # 3. Operating systems that do not have an RDP server I use a [VNC server](vnc.html) such as TigerVNC.
xfreerdp /u:.\\administrator /v:192.168.122.192 /video /rfx /network:lan /gfx
kscreen-doctor -o # E.g. # Output: 1 Virtual-1 7530657f-8794-4e63-b8f4-ab83368f144a # In the output I can see that there is only one "Output" named "Output: 1". kscreen-doctor output.1.addCustomMode.960.990.60000.full # From "System Settings" > "Display Configuration" > "Resolution:" select "960 x 990". # Note: if you are connected via RDP, the mouse might not be calibrated (cusor is in place A but clicks happen in place B). Reconnect via RDP.
sudo apt install plasma-session-x11 xrdp xorgxrdp
sudo dnf install plasma-workspace-x11 sudo dnf install xrdp xorgxrdp # Edit file /etc/xrdp/xrdp.ini, uncomment the entire section "[Xorg]". sudo systemctl enable --now xrdp
sudo pacman -S base-devel go git mkdir -p ~/work/aur ; cd ~/work/aur git clone https://aur.archlinux.org/yay.git cd yay makepkg sudo pacman -U yay*.pkg.tar.zst # E.g. yay-11.3.2-1-x86_64.pkg.tar.zst
# We need the KDE Plasma X11 session. sudo pacman -S plasma-x11-session # Reboot and log into the KDE Plasma X11 session. # As per https://wiki.archlinux.org/title/xrdp yay xrdp # Select option 1 to build and install xrdp. yay xorgxrdp # Select option 1 to build and install xorgxrdp. sudo systemctl enable --now xrdp cat /etc/X11/Xwrapper.config # Should say: allowed_users = anybody cat ~/.xinitrc # Should say: export DESKTOP_SESSION=plasma /usr/lib/plasma-dbus-run-session-if-needed startplasma-x11
sudo zypper install xrdp xorgxrdp sudo systemctl enable --now xrdp
/etc/xrdp/xrdp.ini
[Xvnc]
[Xorg]
startplasma-x11
pkg install xrdp xorgxrdp sysrc xrdp_enable="YES" sysrc xrdp_sesman_enable="YES" # Create file ~/startwm.sh with content: exec dbus-launch --exit-with-x11 ck-launch-session startplasma-x11 chmod +x ~/startwm.sh pkg install firefox # Restart the computer.
xfreerdp --help
# For FreeRDP >= 3: xfreerdp /u:.\\administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse # Here ".\\" represents the "domain" of the user "administrator". "." means the current computer as a domain. # Or for FreeRDP 2: xfreerdp /u:administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse
+home-drive