-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read configuration for only virtual X server #1606
base: devel
Are you sure you want to change the base?
Conversation
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.
I had a look some years ago with the autoloading of modules. I came to the conclusion that the HAL part of Xorg loads modules directly without having to look for configuration files. For example, the load of |
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(?).
I am not really sure, but I think that the loading code works by first reading the file specified by -config, then appending all the files found in -configdir, and in the end auto-configuring what is missing. I know that with an X server connected to real hardware, you can for instance specify mouse settings in /etc/X11/xorg.conf.d, and have the monitor hardware probed automatically. |
I found that there is another potential bug lurking: If -config is not specified, it will read the default /etc/X11/xorg.conf, which of course can contain whatever irrelevant to xrdp. There doesn't seem to be some way of saying that you don't want a -config or -configdir (other than setting it to an invalid directory, which leaves an error message); over-specifying by pointing both to the same destination seems to work just as fine. |
FWIW, if I add myself to the render group (I am on a Debian derivative):
then I get these lines in ~/.xorgxrdp.10.log
even if both -config and -configdir are now redirected to /etc/X11/xrdp |
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:
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:
or
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.