Multiple monitors

Multi-headmulti-screenmulti-display or multi-monitor represent a setup when multiple display devices are attached to a computer. This article provides general description of multiple multi-head setup methods, and provides some examples of configuration.

Separate screens

This is the original way of configuring multiple monitors with X, and it has been around for decades. Each physical monitor is assigned as an X screen, and while you can move the mouse between them, they are more or less independent.

Normally the X display has a single identifier such as :0 set in the DISPLAY environment variable, but in this configuration each screen has a different $DISPLAY value. The first screen is :0.0, the second is :0.1 and so on.

With this configuration, it is not possible to move windows between screens, apart from a few special programs like GIMP and Emacs which have multi-screen support. For most programs you must change the DISPLAY environment variable when launching to have the program appear on another screen:

# Launch a terminal on the second screen
$ DISPLAY=:0.1 urxvt &

Alternatively, if you have a terminal on each screen launching programs will inherit the DISPLAY value and appear on the same screen they were launched on. But moving an application between screens involves closing it and reopening it again on the other screen.

Working this way does have certain advantages, such as windows popping up on one screen won’t steal the focus away from you if you are working on another screen – each screen is quite independent.

Configuration using xorg.conf

This is similar to using xrandr, separate Monitor section is needed for each screen. As an Identifier, the same value as reported by xrandr -q is used (i.e. Identifier "VGA1" is used instead of --output VGA1).

Example: dualhead configuration using relative coordinates

/etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor" 
  Identifier "HDMI1"
  Modeline "1360x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync
  Modeline "1680x1080_60.00"  151.50  1680 1792 1968 2256  1080 1083 1093 1120 -hsync +vsync
  Option "PreferredMode" "1680x1080_60.00"
  Option "UseEDID" "False"
EndSection
Section "Monitor"
  Identifier "VGA1"
  Modeline "1360x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync
  Modeline "1440x900_60" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
  Option "PreferredMode" "1440x900_60"
  Option "UseEDID" "False"
EndSection

Note: This configuration is fine if you have only one monitor, in fact we advise you to change the identifier item to the one your system gives you.
It is also recommended to use the UseEDID option as false to make xorg recognize the monitors without problems and with the resolution you set.

Example: dualhead configuration using relative coordinates with custom resolutions

The ID for each monitor can be found by running the $ xrandr -q command and should be defined as Monitor-<ID> inside the Device section.

You can continue to consult the guide on arch https://wiki.archlinux.org/index.php/Multihead or post to our forum

 

Calogero Scarnà
Calogero Scarnà
Articoli: 299

Newsletter

Inserisci il tuo nome e il tuo indirizzo email qui sotto e iscriviti alla nostra newsletter