[clug] Connecting a monitor with xrandr

David Tulloh david at tulloh.id.au
Fri Jan 1 20:29:04 MST 2010

Paul "TBBle" Hampson wrote:
> 2009/12/28 David Tulloh <david at tulloh.id.au>:
>> I often use my laptop with an external monitor, which I normally rotate on
>> it's side.
>> This is the recipe I follow every time I plug a monitor in.  Am I missing
>> something?  This seems far too complicated.
>> # Fire up the second monitor
>> xrandr --output VGA --auto --right-of LVDS
>> # Rotate the second monitor
>> xrandr -o right
>> # For some reason the first monitor is disabled now, switch it back on
>> xrandr --output LVDS --auto
>> # Now the monitors aren't using the full area.  This fixes it all up.
>> xrandr --output VGA --auto --right-of LVDS
>> # After the rotate the dpi is all wonky, which affects programs like
>> Mozilla.
>> xrandr --dpi 98x98
>> Does someone here understand X properly and can simplify this?
> You can stack up your xrandr commands in one line, if that helps? I
> have an alias
> for when I plug or unplug the HDMI cable in my laptop:
> xrandr --output LVDS --auto --output HDMI-0 --right-of LVDS --auto
Thanks, that helped, I also found the 1.2 version of the rotate command 
which had less side effects.

The line I'm now using is:
xrandr --output VGA --auto --right-of LVDS --rotate right --dpi 98x98


More information about the linux mailing list