X configuration paradigm, and a proposal

Avi Alkalay avibrazil at gmail.com
Sun Nov 7 19:33:27 PST 2004


On Mon, 8 Nov 2004 02:23:35 +0100, Diego Calleja <diegocg at teleline.es> wrote:
> IMHO making "human readable configuration" is wrong and misguided - users
> should _never_ touch configuration files.

Yes, but currently they have to change it by hand. HW manufacturers
don't know how, or don't have time to spend writing xorg.conf parsers,
to automatically edit xorg.conf to make user's life easyer.

Yesterday, a newbie Linux user asked my help to change its screen
resolution from 640x480 (autodetected) to 1024x768. I had to manually
edit xorg.conf and change monitor's horizontal sync.



> Besides, your key/value scheme has
> exactly the same problem than current xorg configuration file, you need to
> know what key/values you need to change/add/delete.

Yes, but it is way easier for a PROGRAM to precisely access and change
the key named "screen0/display/depth" than to grep it, separate it,
edit it, and reinsert it on the text.



> Also IMHO xorg.conf
> itself already has a "key/value scheme":
> Section "Screen" -> Subsection "Display" -> Depth 4, modes $FOO,
> it's just in a single file.

All configuration files on earth can be represented by a key/value
scheme. My point is weather is human-only accessible or machine
accessible. Current xorg.conf is almost human-only accessible, so is
difficult to write a program to parse it etc, so is difficult to other
programs (device drivers, plugins, extensions) to integrate with it in
a popular way.



> xorg currently supports autoconfiguration, you could tweak your scripts,
> so if xorg startup fails you can relaunch xorg with the autoconfiguration
> parameter, save the configuration file and relaunch X again. Of course
> Xorg don't detects all the hardware, the configuration file could
> (should?) be generated by a mix of hardware detectors + kernel (sysfs).
> 
> In fact, in my opinion this is how it should be done: no configuration
> file needed, _always_ detect everything at runtime.
> 
> Also, I wouldn't be surprised if some distros had already solved this
> problem ;)

Sometimes you need to force a configuration. For example, when I use
my 1024x768 laptop to make presentations with old projectors,
sometimes I have to force an 800x600 resolution, otherwise people will
not see all the screen projected.

Autoconfiguration is not the solution for everything, and by now we
only agreed that users should never edit xorg.conf by hand.

A key/value pair paradigm makes X.org configuration atoms preciselly
accessible by an API, which makes very easy the writing of higher
level GUI configuration software.

Thoughts ?

Regards,
Avi



More information about the xorg mailing list