Jamis Buck wrote:
> Jason Voegele wrote:
> 
>> I solved this problem by using init scripts.  I have two init scripts
>> called setup_home and setup_work.  These scripts copy alternate versions
>> of configuration files depending on whether I'm at work (attached to
>> external monitor, keyboard, etc.) or at "home" (unattached laptop).  I
>> have one of these two scripts start depending on the runlevel. I can then
>> choose a run level at boot time, which is very easy with GRUB, and these
>> scripts will choose the right settings for me.
> 
> 
> Ah, much nicer.  I've got a custom runlevel already for booting without 
> X--don't know why it didn't occur to me to do this for booting with a 
> different X server layout.  Thanks, Jason!  This will do nicely.
> 
> I may still try to experiment with the hardware detection route... just 
> for fun... ;)
> 

You could always start X in -probeonly mode (or something), then parse 
the output of /var/log/XFree86.0.log for the DDC detection stuff.

You could do this with xinit.  Pass it a script as its startup program 
file which will parse the log file and output the results somewhere. 
When the script exits, xinit will bring down the X server cleanly.  Then 
run another script after xinit finishes to check the output of the 
previous script.  voila!  I think...


--
http://www.it-is-truth.org/