Skip to content

Compiling and using xorgxrdp

Blindauer Emmanuel edited this page Oct 18, 2017 · 8 revisions

Why xorgxrdp

xorgxrdp is a collection of modules to be used with the pre-existing Xorg install to make the X server act like X11rdp. Unlike X11rdp, you don't have to recompile the whole X Window System. Instead, additional drivers are installed to a location where the existing Xorg installation would pick them.

Driver compilation

Make sure to compile and install xrdp first. xorgxrdp uses some include files from xrdp. To check out xorgxrdp, run following command.

git clone https://github.com/neutrinolabs/xorgxrdp.git

The compilation is similar to that of xdrp itself.

 cd xorgxrdp
 ./bootstrap
 ./configure
 make
 sudo make install

If xrdp was not installed to the system directory (/usr), you may need to specify the path to its pkg-config file at the configure stage:

./configure PKG_CONFIG_PATH=/usr/local/libpkgconfig

Alternatively, specify XRDP_CFLAGS and XRDP_LIBS so that XRDP_CFLAGS points the compiler to the common directory in the xrdp sources:

./configure XRDP_CFLAGS=-I/path/to/xrdp/common XRDP_LIBS=" "

sudo make install will typically install following files

/etc/X11/xrdp/xorg.conf
/usr/lib/xorg/modules/drivers/xrdpdev_drv.so
/usr/lib/xorg/modules/input/xrdpkeyb_drv.so
/usr/lib/xorg/modules/input/xrdpmouse_drv.so
/usr/lib/xorg/modules/libxorgxrdp.so

The configure script will look for the actual Xorg location, so lib could become lib64 on 64-bit systems.

Usage

Use the "Xorg" (previously "Session manager") entry in the xrdp chooser when connected. The difference between "X11rdp" and "Xorg" entries in xrdp.ini in the value of the code key, which is 10 to X11rdp and 20 for Xorg.

Xorg may be installed setuid root. That is not needed for xorgxrdp. Moreover, Xorg may refuse to work if the user is deemed to be non-local. Starting with version 0.9.1, xrdp includes a fix that effectively suppresses setuid root. However, that fix requires Linux kernel 3.5 or newer.

For older kernels and non-Linux systems, one possible fix is to create a wrapper around Xorg. Create a wrapper, say, /usr/bin/XorgXrdp with the following contents (that's for x86_64 Linux):

#! /bin/sh
exec /lib64/ld-linux-x86-64.so.2 /usr/bin/Xorg "$@"

Adjust sesman.ini to call XorgXrdp instead of Xorg.

Most distributions now provide a config file for this problem: Edit /etc/X11/Xwrapper.config (ubuntu, Debian):

allowed_users=anybody
needs_root_rights=no
Clone this wiki locally