On Fri, Apr 02, 2010 at 01:20:26PM -0700, Keith Packard wrote: > On Fri, 2 Apr 2010 21:01:30 +0200, Julien Cristau <jcris...@debian.org> wrote: > > > And I'll be using /usr/lib/X11/xorg.conf.d/ because using /etc for the > > default "make my xserver work" snippets just seems wrong (and /usr > > allows me to make sure they're in sync with the packages, not conflated > > with configuration which is the admin's domain). > > Yeah, that's why I picked the 'secondary' path supported by the server > so that a directory in /etc/X11 would completely override these files. > > Sounds like we need to fix the server config file search path to look in > a sensible place rather than $(prefix)/etc/X11
This is untested, but I think the patch below is all it would take to add support for a second "system" directory in $prefix/lib/X11 with lowest priority. -- Dan diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 718a078..06a3fa0 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -112,6 +112,10 @@ extern DeviceAssocRec mouse_assoc; "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ "%P/lib/X11/%X" #endif +#ifndef SYS_CONFIGDIRPATH +#define SYS_CONFIGDIRPATH "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ + "%P/lib/X11/%X" +#endif #ifndef PROJECTROOT #define PROJECTROOT "/usr/X11R6" #endif @@ -2429,7 +2433,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) { ConfigStatus xf86HandleConfigFile(Bool autoconfig) { - const char *filename, *dirname; + const char *filename, *dirname, *sysdirname; char *filesearch, *dirsearch; MessageType filefrom = X_DEFAULT; MessageType dirfrom = X_DEFAULT; @@ -2452,6 +2456,8 @@ xf86HandleConfigFile(Bool autoconfig) dirfrom = X_CMDLINE; xf86initConfigFiles(); + sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL, + PROJECTROOT); dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT); filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT); if (filename) { @@ -2472,6 +2478,9 @@ xf86HandleConfigFile(Bool autoconfig) "Unable to locate/open config directory: \"%s\"\n", xf86ConfigDir); } + if (sysdirname) + xf86MsgVerb(X_DEFAULT, 0, "Using system config directory: \"%s\"\n", + sysdirname); if (!filename && !dirname) return CONFIG_NOFILE; } _______________________________________________ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg