Xrdp
xrdp is a daemon that supports Microsoft's Remote Desktop Protocol (RDP). It uses Xvnc, X11rdp or xorgxrdp as a backend.
Installation
Install the xrdpAUR package (or alternatively xrdp-gitAUR for the development version).
Autoboot at startup
The xrdpAUR package contains service files for systemd. Enable xrdp.service
and xrdp-sesman.service
.
Running as Terminal Server (Xorg)
Install the xorgxrdp-gitAUR package.
Add allowed_users=anybody
to /etc/X11/Xwrapper.config
to allow anybody to start X
Edit ~/.xinitrc
or /etc/X11/xinit/xinitrc
to launch your DE.
Troubleshooting
If you encounter black box around mouse pointer create ~/.Xresources-xrdp
with line Xcursor.core:1
and load it in ~/.xinitrc
like
xrdb ~/.Xresources-xrdp exec startlxde
You may need to install xorg-xrdb.
Running with Vino (Gnome VNC-Server for root session)
Enable the server to be seen via vino-preferences. Since vino defaults to port 5900 for connections, we will edit the xrdp configuration file to understand this. Append the vino session to xrdp's configuration file:
/etc/xrdp/xrdp.ini
[xrdp8] name=Vino-Session lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=5900
If you encounter VNC connection errors, it may be because vino-server
defaults to accepting only TLS connections. This must be changed to standard VNC authentication so that xrdp
may connect:
gsettings set org.gnome.Vino require-encryption false
You can also restrict vino-server
to only listen on the loopback interface:
gsettings set org.gnome.Vino network-interface lo
Remember to restart the xrdp server, and one should be able to connect to the vino session (tested using xfreerdp).
Usage
After starting the xrdp
and xrdp-sesman
services, you should be able to connect an RDP client to the host on the default RDP port (3389). If successful, you will be greeted with the xrdp session manager window which allows you to choose between Xorg or Xvnc sessions and provides inputs for user authentication. The session manager UI can be highly customized by modifying /etc/xrdp/xrdp.ini
.
The parameters used to start Xorg and Xvnc display servers can be configured in /etc/xrdp/sesman.ini
.
After successfully starting a display server, xrdp will execute /etc/xrdp/startwm.sh
by default. This script is meant to start a window manager (similar to .xinitrc) and will typically require modification to start your desired window manager. Note: the default script will attempt to start xterm
which will cause the connection to fail if xterm
is not installed.
If you just close the session window and RDP connection, you can access the same session again next time you connect with RDP. When you exit the window manager or desktop environment from the session window, the session will close and a new session will be opened the next time.
xrdp checks only if a session with the same geometry is already opened. It will start a new session if the geometry/resolution doesn't match.