X configuration paradigm, and a proposal

Francois Tigeot ftigeot at wolfpond.org
Tue Nov 9 00:06:45 PST 2004


On Mon, Nov 08, 2004 at 09:47:23PM +0000, Torgeir Veimo wrote:
> On Mon, 2004-11-08 at 17:29 -0400, Erik Harrison wrote:
> 
> For my own part, I often find myself swapping gfx card, but want to
> retain every other aspect of the configuration. I then have to hand edit
> xorg.conf to change eg. Driver "radeon" to Driver "mga". My point: It
> would be good to only configure those things that diverge from the
> default settings, such as specific mouse input settings and mode lines.

I attempted to do such a thing back in the summer, and I found out I would
probably have had to rewrite all of Xorg auto-configuration code: if you use
auto-detection, everything is set-up automatically and there is no way to
override one single value.

I wrote my own system with pseudo-xml elements in a xorg.conf template
file and some shell scripting instead:

http://www.thinbsd.org/cvsweb/ThinBSD/src/etc/X11/xorg.conf.sample?rev=1.5
http://www.thinbsd.org/cvsweb/ThinBSD/src/usr.local.rc.d/xorg.sh?rev=1.1

The process is the following:

1. Xorg -configure is run a first time to write a new configuration file
2. This file is parsed to extract some of the auto-detected values
3. The template file is copied to xorg.conf
4. Stub parameters in xorg.conf are replaced with the auto-detected ones

-- 
Francois Tigeot



More information about the xorg mailing list