per user
The native screen-size detection doesn’t work for dual-head installations. To let X11 handle both screens as one large display, find the section Screen
in the /etc/X11/xorg.conf
and add the following lines:
SubSection "Display"
Virtual 2560 1024
EndSubSection
This is for two 1280×1024 displays side-by-side (1280+1280 = 2560). Now you can use xrandr
to set displays.
xrandr -q
Shows all available displays. Usually it will show the devices VGA-0
and LVDS
. To change the output of the external display to be left of the internal LCD panel, use something like
xrandr --output VGA-0 --left-of LVDS
You might also have to use System → Preferences → Screen Resolution to configure the location of the displays.
Fix screen order
Under Intrepid, it often happens to me that my screenorder is wrong after login. This is shown by a mirrored output on the left display, but the system thinks that there’s a left workspace. On rare occassions, I even have the wrong order (i.e. if I move the mouse to the right on the right workspace, it appears on the left display’s workspace.) This is quickly fixed by switching the order around:
#!/bin/sh
echo Switching position of displays
xrandr --output VGA-0 --right-of LVDS
echo Switching off ext. display
xrandr --output VGA-0 --off
echo Switching back to normal
xrandr --output VGA-0 --mode 1280x1024 --rate 75 --left-of LVDS
After calling the script, my displays are showing the correct workspaces.
system-wide
To configure dual-head system-wide (for Desktop computers), there is a great manual at UbuntuForums.
- Use
xrandr -q
to get the output device’s names (for me it wasVGA-0
andDVI-0
) - open the
/etc/X11/xorg.conf
in your favorite editor - find the section
Device
and add 2 lines so that it looks like this:Section "Device"
Identifier "Configured Video Device"
Option "monitor-VGA-0" "right"
Option "monitor-DVI-0" "left"
EndSection
- The device names have to be prefixed with
monitor-
. The names after that are for you to choose. - find the
Monitor
section and change the identifier to one of the names. (e.g.right
) - add another
Monitor
section below and change the identifier to the other name. (left
) Also add the lineOption "LeftOf" "right"
in between. - now the both monitor sections should look like this:
Section "Monitor"
Identifier "right"
EndSection
Section "Monitor"
Identifier "left"
Option "LeftOf" "right"
EndSection
- find the
Screen
section and add the following line to define the default display.
Monitor "right"
- add a
SubSection "Display"
and theVirtual
line as with the per-user configuration - save the file and restart X