# Remote Desktop Protocol (RDP) is better than VNC, Virtual Box, QEMU etc. # How to install the RDP server xrdp Screen recordings https://www.youtube.com/@nmariusp/search?query=xrdp # Glossary RDP is the Remote Desktop Protocol. https://en.wikipedia.org/wiki/Remote_Desktop_Protocol OS means operating system. # RDP features * 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 xfreerdp command line parameter is "/dynamic-resolution". * Copy/paste of text works OK. * YouTube playback with almost acceptable speed and with sound. The xfreerdp command line parameter is "/video /rfx /gfx /sound:sys:pulse". * 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 xfreerdp command line parameter is "/network:lan". * The home directory from the machine where the RDP client runs can be made available to the machine where the RDP server runs via Samba or Windows shares (the share named "\\tsclient"). The xfreerdp command line parameter is "+home-drive". # Linux and FreeBSD RDP server xrdp If you cannot make your X server work correctly, e.g. small resolution. An alternative is to install an RDP server and to connect to this computer from another computer using an RDP client. 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. ## Kubuntu >= 22.10 Screen recording https://www.youtube.com/watch?v=kG2sjP1VTV4
sudo apt install xrdp xorgxrdp
## Fedora >= 38 Screen recording https://www.youtube.com/watch?v=Doj8VpTLShs
sudo dnf install plasma-workspace-x11 # Needed on Fedora KDE 40.
sudo dnf install xrdp xorgxrdp
# Edit file /etc/xrdp/xrdp.ini, uncomment the entire section "[Xorg]".
sudo systemctl enable --now xrdp
## EndeavourOS with KDE Plasma installed from the OS installer, Arch Linux installed using archinstall with the option "desktop, kde" 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
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:
# As per https://wiki.archlinux.org/title/xrdp
yay xrdp
yay 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=tlMefsBArO4 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
## FreeBSD >= 13.2 Screen recording https://www.youtube.com/watch?v=8MqBnb3Y9JU I installed FreeBSD 13.2 using FreeBSD-13.2-RELEASE-amd64-disc1.iso. In the installer, I created a user named "administrator" and added this user to the user group "wheel". I connect to the VM in text user interface mode using ssh:
ssh administrator@192.68.122.6

su -

# Surviving at the command line:
pkg # Install the pkg command line app.
pkg install bash emacs-nox mc git
chsh -s /usr/local/bin/bash

# Surviving in GUI:

pkg install xorg
pw groupmod video -m administrator
pkg install noto-2.0 sudo
EDITOR=emacs visudo
# uncomment line:
%wheel ALL=(ALL:ALL) ALL
# We are inside emacs. Save the modified file: Ctrl+X S, Ctrl+X C.

# In file /etc/fstab append line:
emacs /etc/fstab
proc /proc procfs rw 0 0
# We are inside emacs. Save the modified file: Ctrl+X S, Ctrl+X C.

mount -a

pkg install kde5
sysrc dbus_enable="YES"
sysctl net.local.stream.recvspace=65536
sysctl net.local.stream.sendspace=65536

# I followed the instructions from https://download.freebsd.org/doc/en/books/handbook/handbook_en.pdf up to and including the chapter "7.2.1.4. Start KDE Plasma".

# As user administrator:
chsh -s /usr/local/bin/bash
emacs ~/.profile
# Uncomment the line:
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH
# Save and exit the text editor.
# Restart the computer.

pkg install xrdp xorgxrdp
sysrc xrdp_enable="YES"
sysrc xrdp_sesman_enable="YES"

# Create file ~/startwm.sh with content:
exec ck-launch-session startplasma-x11

chmod +x ~/startwm.sh

pkg install firefox
# Restart the computer.
## Alpine Linux Screen recording https://www.youtube.com/watch?v=d9WXHMfBDT0 I installed Alpine Linux 3.18 using alpine-standard-3.18.2-x86_64.iso. As per https://docs.alpinelinux.org/user-handbook/0.1a/index.html , using full setup-alpine, use default mirror, add "community" repository. In the installer, I created a user named "administrator" and the user can use "doas". I connect to the VM in text user interface mode using ssh:
ssh administrator@192.68.122.6

doas su

# Surviving at the command line: bash, emacs-nox, mc, git.
apk update
apk upgrade
apk add emacs-nox mc git bash
#chsh -s /bin/bash

# Surviving in GUI:
setup-xorg-base
# I do not install alpine-desktop, I install KDE Plasma desktop as per https://wiki.alpinelinux.org/wiki/KDE

apk add plasma elogind polkit-elogind
rc-update add dbus
rc-update add elogind
rc-update add polkit
setup-devd udev
rc-update add sddm
rc-service sddm start

# Install xrdp and xorgxrdp per https://wiki.alpinelinux.org/wiki/Remote_Desktop_Server
apk add xrdp xorgxrdp
rc-update add xrdp
rc-update add xrdp-sesman

# Create file ~/.xinitrc with content:
exec startplasma-x11

reboot
# Linux and FreeBSD client xfreerdp Install from your OS the binary package `freerdp`. Run:
xfreerdp --help
Note down any of the command line parameters that you might need. Use a command line like:
xfreerdp /u:administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse
You can resize the window and the resolution of the RDP server will change correctly. Other interesting command line parameters:
+home-drive
# Windows RDP server On the Windows OS 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. # Windows RDP client Open the app Remote Desktop Connection. Or install another RDP client e.g. "Sysinternals Remote Desktop Connection Manager" (rdcman) https://en.wikipedia.org/wiki/Remote_Desktop_Protocol I prefer to use the app "Sysinternals Remote Desktop Connection Manager" 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. # Operating systems that do not have a RDP server such as xrdp OpenBSD and NetBSD do not run the xrdp RDP server yet. I install the VNC server tightvnc. Screen recording https://www.youtube.com/watch?v=xqjCF4mVdg0 , https://www.youtube.com/watch?v=eG2KcljSHRA