Xrdp

xrdp is a daemon that supports Microsoft's Remote Desktop Protocol (RDP). It uses Xvnc or xorgxrdp as a backend.

Installation

Install the xrdpAUR package (or alternatively xrdp-gitAUR for the development version). This only supports Xvnc as the backend.

Xorg backend

To use xorgxrdp instead for the backend, install the xorgxrdpAUR package.

Add allowed_users=anybody to /etc/X11/Xwrapper.config to allow anybody to start an X server.

Usage

First, start the xrdp service. 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 read from ~/.xinitrc or /etc/X11/xinit/xinitrc if they exist. It is recommended to edit ~/.xinitrc to start your desktop environment or window manager, but you can also edit /etc/xrdp/startwm.sh.

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.

Tips and tricks

Autostart at boot

The xrdpAUR package contains service files for systemd. Enable .

Graphical acceleration

For Xorg sessions, you can enable OpenGL and Vulkan graphical acceleration by installing for Intel and AMD GPUs and for Nvidia GPUs.

Sound

Install the necessary PulseAudio modules with .

Troubleshooting

Black box around cursor

If you encounter black box around mouse pointer create ~/.Xresources-xrdp with line Xcursor.core:1 and load it in ~/.xinitrc like

You may need to install .

Black screen

You may get a black screen after logging into the session manager if your ~/.xinitrc has set in the .

Try copying ~/.xinitrc to , removing , and updating /etc/xrdp/startwm.sh to call instead of ~/.xinitrc. You might need to append your desktop environment to the call to .xrdpinitrc, as is mentioned in ~/.xinitrc; eg. .

Black screen with a desktop environment

If you get a black screen and you use a desktop environment, it may be a result of D-Bus not being properly initialized. Try running the desktop environment with in your ~/.xinitrc file. For KDE Plasma, you can use the command .

loginctl or systemctl --user not working

Try commenting out all the references to in /etc/pam.d/system-auth. See this issue.

Prompts for gnome-keyring or KDE Wallet

If you are prompted to login to gnome-keyring or [KDE Wallet] when your session starts, modify the file /etc/pam.d/xrdp-sesman as follows:

If you only use gnome-keyring it is not necessary to include the kwallet5 lines, and vice versa.

Prevent autostart items from starting

To prevent user defined items from starting you can set the autostart directory param on the session in the ~/.xinitrc to use only the global directory.

No sound

This could be a symptom of an issue with loginctl, so try that fix above. The following error may be encountered in the system journal:

Failed to load module "module-x11-publish" (argument: "display=:10.0 xauthority="): initialization failed.

This is the result of systemd improperly starting PulseAudio. One workaround is to disable the user unit files and either for your own user or for all users, and make PulseAudio start when needed by setting to in .

If sound still does not work, try manually starting PulseAudio with pulseaudio & in your ~/.xinitrc.

Two-finger scrolling is too fast

Use the xorg backend, make sure xorgxrdp is 0.9.19 or newer. Then add to the [SessionVariables] section of /etc/xrdp/sesman.ini.

See this issue for details.

gollark: I just use ethernet over power.
gollark: I doubt it; Intel love artificial segmentation.
gollark: My AM4 socket motherboard will be able to take this year's (upcoming) new CPUs, probably.
gollark: All Hail AMD!
gollark: https://pastebin.com/EGPpcZbN

See also

  • TigerVNC - VNC, an alternative to RDP, also used as backend here.
  • a rdesktop fork that supports RDP 7.1 features including network level authentication (NLA). It primarily consists of the client. In addition, the command provides a quick and easy way to start an RDP server.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.