[ltp] automatically detecting external monitor?

Richard Neill linux-thinkpad@linux-thinkpad.org
Fri, 15 Dec 2006 23:46:39 +0000


Juergen Lemke wrote:
> Hi everyone,
> 
> I have been the happy user of a X30 under GNU/Linux
> for a couple of years now. I finally got around to
> using an external monitor, keyboard and mouse whenever
> I am at a desk, and I have successfully configured
> X.org to work with both the internal monitor (at
> 1024x768x24) as well as the external one (at
> 1280x1024x24). For other users of this model, I have
> attached my xorg.conf in case they find it useful.
> 
> I do so by using two "Screen" sections in my xorg.conf
> file, and starting X with either
> 
> $ startx -- - screen internal
> 
> or
> 
> $ startx -- - screen external
> 
> This works fine. But is it possible to have X
> automatically detect if the external monitor is
> attached, and pick the correct "Screen" section on its
> own?
> 
> Thank you for any advice!

No idea how to autodetect, but why not set up a single screen, with 
various resolutions up to 1280x1024. Then use xvidtune/xrandr to 
dynamically re-size and scale, without needing to restart X. You could 
maybe even bind it to Fn-F7 using acpi.

Richard