Skip to content

Remote Desktop Protocol

Remote Desktop Protocol (RDP) is a proprietary protocol which provides a user with a graphical interface to connect to another computer over a network connection.

Setting RDP

Install Xrdp and the Xorg backend:

Terminal window
sudo pacman -Syyu xrdp xorgxrdp

Then, enable the xrdp service:

Terminal window
sudo systemctl enable xrdp

Create the ~/.xinitrc file with the following content:

~/.xinitrc
#!/usr/bin/env bash
#
#
# Executed by startx (run your window manager from here)
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# Workaround for GNOME apps starting slowly
# See: https://bbs.archlinux.org/viewtopic.php?id=224787
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
# Start the GNOME session
exec gnome-session

Finally, reboot the system and don’t login inside the system otherwise you cannot login by RDP. Only one user session is allowed at time.

Open your RDP client, retrieve the IP address of your system and login by your user account credentials.