From b836bb38b918b38ce619f48dcad382d54ec76795 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Sun, 14 Jun 2020 02:31:38 +0200 Subject: [PATCH 1/2] Read only configuration for virtual X server When the X server is launched, only the configuration _main file_ xrdp/xorg.conf is specified, but the configuration _directory_ is retained as default, as is indicated by the output: (==) Using config directory: "/etc/X11/xorg.conf.d" in ~/.xorgxrdp.10.log. If the host has an existing X server running for the console, and this is not entirely auto-configured, configuration files from this directory will be picked up and cause the virtual X server that XRDP launches to attempt to load modules for it, which may result in errors such as: (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied) or (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied) Searching the Internet for these errors will typically lead the user to a myriad of non-solutions, involving added the user to the tty group, or editing /etc/X11/Xwrapper.config. This changeset changes the configuration of the virtual X server so that it considers only /etc/X11/xrdp as its proper configuration directory, and pick up the xorg.conf file by default from there. --- sesman/sesman.ini.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sesman/sesman.ini.in b/sesman/sesman.ini.in index 869f5bb5c1..b7dbfcb005 100644 --- a/sesman/sesman.ini.in +++ b/sesman/sesman.ini.in @@ -85,8 +85,8 @@ SyslogLevel=DEBUG ; param=Xorg ; Leave the rest paramaters as-is unless you understand what will happen. -param=-config -param=xrdp/xorg.conf +param=-configdir +param=xrdp param=-noreset param=-nolisten param=tcp From 6a4ba11708b08353463faf9ee45d45356bb86129 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Mon, 15 Jun 2020 09:56:31 +0200 Subject: [PATCH 2/2] Use both config and configdir to avoid any defaults If the -config switch is left out, the server will attempt to load settings from the default file /etc/X11/xorg.conf. This file is now usually non-existent; most distributions preferring to have the configuration through files in /etc/X11/xorg.conf.d instead. But in order to prevent any legacy settings that are put there to interfere with XRDP, _both_ config and configdir should be redirected to the xrdp/ subdirectory. This will overspecify the configuration by having the xrdp/xorg.conf file probably read twice; this does not seem to cause any harm. Incidentally, it does seem to make the X server now pick up xrdpdev as a GPUDevice(?). --- sesman/sesman.ini.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sesman/sesman.ini.in b/sesman/sesman.ini.in index b7dbfcb005..e237d0496e 100644 --- a/sesman/sesman.ini.in +++ b/sesman/sesman.ini.in @@ -85,6 +85,8 @@ SyslogLevel=DEBUG ; param=Xorg ; Leave the rest paramaters as-is unless you understand what will happen. +param=-config +param=xrdp/xorg.conf param=-configdir param=xrdp param=-noreset