mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-22 01:20:26 +00:00
xfree86: Use xorg.conf.d directory for multiple config files
Currently there is a single file, xorg.conf, for configuring the server. This works fine most of the time, but it becomes a problem when packages or system services need to adjust the configuration. Instead, allow multiple configuration files to live in a directory. Typically this will be /etc/X11/xorg.conf.d. Files with a suffix of .conf will be read and added to the server configuration after xorg.conf. The server won't fall back to using the auto configuration unless there is no config file and there are no files in the config directory. Right now this uses a simpler search template than the config file search path by not using the command line or environment variable parameters. The matching code was refactored a bit to make this more coherent. Any DDX wanting to read the config files will need to call xf86initConfigFiles before opening/reading them. This is to allow xf86openConfigFile without xf86openConfigDirFiles and vice-versa. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
This commit is contained in:
parent
f1e869aca1
commit
efa5269f23
9 changed files with 321 additions and 107 deletions
|
|
@ -2,27 +2,35 @@
|
|||
.ds q \N'34'
|
||||
.TH __xconfigfile__ __filemansuffix__ __vendorversion__
|
||||
.SH NAME
|
||||
__xconfigfile__ \- configuration File for __xservername__ X server
|
||||
__xconfigfile__ and __xconfigdir__ \- configuration files for
|
||||
__xservername__ X server
|
||||
.SH INTRODUCTION
|
||||
.B __xservername__
|
||||
supports several mechanisms for supplying/obtaining configuration and
|
||||
run-time parameters: command line options, environment variables, the
|
||||
__xconfigfile__ configuration file, auto-detection, and fallback defaults.
|
||||
When the same information is supplied in more than one way, the highest
|
||||
precedence mechanism is used. The list of mechanisms is ordered from
|
||||
highest precedence to lowest. Note that not all parameters can be
|
||||
supplied via all methods. The available command line options and
|
||||
environment variables (and some defaults) are described in the Xserver(__appmansuffix__)
|
||||
and __xservername__(__appmansuffix__) manual pages. Most configuration file parameters, with
|
||||
their defaults, are described below. Driver and module specific
|
||||
configuration parameters are described in the relevant driver or module
|
||||
manual page.
|
||||
__xconfigfile__ and __xconfigdir__ configuration files, auto-detection,
|
||||
and fallback defaults. When the same information is supplied in more
|
||||
than one way, the highest precedence mechanism is used. The list of
|
||||
mechanisms is ordered from highest precedence to lowest. Note that not
|
||||
all parameters can be supplied via all methods. The available command
|
||||
line options and environment variables (and some defaults) are
|
||||
described in the Xserver(__appmansuffix__) and
|
||||
__xservername__(__appmansuffix__) manual pages. Most configuration file
|
||||
parameters, with their defaults, are described below. Driver and module
|
||||
specific configuration parameters are described in the relevant driver
|
||||
or module manual page.
|
||||
.SH DESCRIPTION
|
||||
.B __xservername__
|
||||
uses a configuration file called
|
||||
.I __xconfigfile__
|
||||
and files ending in the suffix
|
||||
.I .conf
|
||||
from the directory
|
||||
.I __xconfigdir__
|
||||
for its initial setup.
|
||||
This configuration file is searched for in the following places when the
|
||||
The
|
||||
.I __xconfigfile__
|
||||
configuration file is searched for in the following places when the
|
||||
server is started as a normal user:
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -93,9 +101,28 @@ directory), and
|
|||
is the machine's hostname as reported by
|
||||
.BR gethostname (__libmansuffix__).
|
||||
.PP
|
||||
Additional configuration files are searched for in the following
|
||||
directories:
|
||||
.PP
|
||||
.RS 4
|
||||
.nf
|
||||
.I /etc/X11/__xconfigdir__\-4
|
||||
.I /etc/X11/__xconfigdir__
|
||||
.I /etc/__xconfigdir__
|
||||
.IR __projectroot__/etc/X11/__xconfigdir__. <hostname>
|
||||
.I __projectroot__/etc/X11/__xconfigdir__\-4
|
||||
.I __projectroot__/etc/X11/__xconfigdir__
|
||||
.IR __projectroot__/lib/X11/__xconfigdir__. <hostname>
|
||||
.I __projectroot__/lib/X11/__xconfigdir__\-4
|
||||
.I __projectroot__/lib/X11/__xconfigdir__
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
The
|
||||
.I __xconfigfile__
|
||||
file is composed of a number of sections which may be present in any order,
|
||||
and
|
||||
.I __xconfigdir__
|
||||
files are composed of a number of sections which may be present in any order,
|
||||
or omitted to use default configuration values.
|
||||
Each section has the form:
|
||||
.PP
|
||||
|
|
|
|||
Loading…
Reference in a new issue