Feature request: modular config files

Jakub Piotr Cłapa loc at toya.net.pl
Mon Oct 31 13:52:31 PST 2005


Jeremy Kolb wrote:
> Andy Goth wrote:
>> Johan wrote:
>>
>>> I don't know if this is dealt with in the new release but i would realy
>>> like to see the config files modular.
>>>
>>> What do you guys think of this idea?
>>
>> I suppose we can add some sort of Include directive, add an option to
>> the autoconfigurator xorg.conf generator thingie (I forget its name) to
>> generate such a tree, and encourage distributors to take advantage.  The
>> toplevel xorg.conf file can just Include everything else.  Of course,
>> existing xorg.confs would continue to work.
> 
> There is nothing worse than wandering through 20 config files trying to
> figure out what to change where.  The X config file is not that large
> and is pretty easy to understand once you get the hang of it.

Apache has such a scheme and I think it works really good for most of 
the users (and is cool as hell for the distro vendors).

Maybe it could be discussed whether the file should be explicitly 
included or some kind of automatic joining should occur. Apache has it 
the latter way with all files matched by /etc/httpd/httpd.conf/*.conf 
being parsed as config files in a alphabetical order. Turning a file off 
is a matter of simple renaming (to change the extension from .conf to 
something else). There are also two other approaches that I'm aware of:

1. The one which was proposed --- with includes (used also in saned).

    It has it's drawbacks. I've searched for too long for the reason
    which caused my scanner not to be seen by the daemon only to discover
    that the whole config file for Mustek parallel port scanners was
    commented out in the main file.

2. All file reside in one directory but only ones having numbers in
    front are parsed (used by fontconfig).

    It's a pain to manage them --- doing an
ln -s some_long_file_name.conf 10_the_same_long_file_name.conf
    is not very ergonomic. IMHO the extension check is sufficient (it
    also eliminates vim backup copies).

-- 
Regards,
Jakub Piotr Cłapa



More information about the xorg mailing list