On Mon, Jul 23, 2007 at 02:02:38PM +0100, Hugo Mills wrote:
>    All - 
> 
>    Does anyone know of a way of determining which external VGA/DVI
> ports on a machine have a monitor attached?
> 
xrandr?
Mine says:-
VGA disconnected
LVDS connected 1400x1050
(amongst other things).
And it's right, the VGA port is unplugged.
>    I want to put it in the start-up for X to work out which of my two
> X configs I need to use, so I need something which is both scriptable
> (command-line only, text output), and doesn't require X to be running.
> 
I realise that xrandr only runs under X, but it's possible to start X 
without an xorg.conf these days, in which you could run xrandr, then 
stop/kill X and restart with the "right" xorg.conf?
Not clean of course, but still, it's an optino.
Cheers,
Al.