[PATCH 3/5] xfree86: Set a saner search path for xorg.conf.d
Dan Nicholson
dbn.lists at gmail.com
Wed Apr 7 06:06:39 PDT 2010
On Tue, Apr 6, 2010 at 9:55 PM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Sat, Apr 03, 2010 at 09:33:49AM -0700, Dan Nicholson wrote:
>> There's no reason to carry all the oddities from xorg.conf like appended
>> hostname to the search path for xorg.conf.d. This changes it to something
>> very simple:
>>
>> /etc/X11/<cmdline>
>> $sysconfdir/X11/<cmdline>
>> /etc/X11/xorg.conf.d
>> $sysconfdir/X11/xorg.conf.d
>
> I wonder if any of these "oddities" would be useful for a multiseat setup or
> could/is already mis-used for one?
Well, the way I see it is that if you have an odd setup, you can
always set -config and -configdir and be much more deterministic about
it anyway.
>
>> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
>> ---
>> cpprules.in | 1 +
>> hw/xfree86/common/xf86Config.c | 16 ++++------------
>> hw/xfree86/doc/man/xorg.conf.man.pre | 22 ++++------------------
>> 3 files changed, 9 insertions(+), 30 deletions(-)
>>
>> diff --git a/cpprules.in b/cpprules.in
>> index 301305e..6e43578 100644
>> --- a/cpprules.in
>> +++ b/cpprules.in
>> @@ -34,6 +34,7 @@ MANDEFS = \
>> -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
>> -D__mandir__=$(mandir) \
>> -D__projectroot__=$(prefix) \
>> + -D__sysconfdir__=$(sysconfdir) \
>> -D__datadir__=$(datadir) \
>> -D__xconfigfile__=$(__XCONFIGFILE__) \
>> -D__xconfigdir__=$(__XCONFIGDIR__) \
>> diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
>> index 718a078..d02c22a 100644
>> --- a/hw/xfree86/common/xf86Config.c
>> +++ b/hw/xfree86/common/xf86Config.c
>> @@ -97,20 +97,12 @@ extern DeviceAssocRec mouse_assoc;
>> #endif
>> #ifndef ROOT_CONFIGDIRPATH
>> #define ROOT_CONFIGDIRPATH "%A," "%R," \
>> - "/etc/X11/%R," "%P/etc/X11/%R," \
>> - "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
>> - "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
>> - "%P/etc/X11/%X," \
>> - "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
>> - "%P/lib/X11/%X"
>> + "/etc/X11/%R," "%C/X11/%R," \
>> + "/etc/X11/%X," "%C/X11/%X"
>> #endif
>> #ifndef USER_CONFIGDIRPATH
>> -#define USER_CONFIGDIRPATH "/etc/X11/%S," "%P/etc/X11/%S," \
>> - "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
>> - "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
>> - "%P/etc/X11/%X," \
>> - "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
>> - "%P/lib/X11/%X"
>> +#define USER_CONFIGDIRPATH "/etc/X11/%R," "%C/X11/%R," \
>> + "/etc/X11/%X," "%C/X11/%X"
>> #endif
>> #ifndef PROJECTROOT
>> #define PROJECTROOT "/usr/X11R6"
>> diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
>> index 9a40ce3..acfa1ca 100644
>> --- a/hw/xfree86/doc/man/xorg.conf.man.pre
>> +++ b/hw/xfree86/doc/man/xorg.conf.man.pre
>> @@ -107,16 +107,9 @@ directories when the server is started as a normal user:
>> .RS 4
>> .nf
>> .IR /etc/X11/ <cmdline>
>> -.IR __projectroot__/etc/X11/ <cmdline>
>> -.I /etc/X11/__xconfigdir__\-4
>> +.IR __sysconfdir__/X11/ <cmdline>
>> .I /etc/X11/__xconfigdir__
>> -.I /etc/__xconfigdir__
>> -.IR __projectroot__/etc/X11/__xconfigdir__. <hostname>
>> -.I __projectroot__/etc/X11/__xconfigdir__\-4
>
> side-note - wtf do we even try parse xorg.conf-4 these days??
4 being XF86_VERSION_MAJOR, of course, which is used nowhere else in
the code and is out of sync with the xorg version number.
$ git grep -l XF86_VERSION_MAJOR
hw/xfree86/parser/scan.c
I guess this was maybe useful when you had multiple versions of the
server installed, but I think you'd be better off just passing the
command line arguments and knowing what you're going to get.
--
Dan
More information about the xorg-devel
mailing list