#pragma search blog/linux == How to set up your _xorg.conf_ for RandR-based dual-headed systems Theoretically, the usual way to set up your dual-headed system on a modern machine that uses the modern [[XRandR http://en.wikipedia.org/wiki/XRandR]] extension is to run _xrandr_ once you've logged in to set things up. Suppose that you are not happy with this; you want your system to be properly dual-headed from the moment that X lights the display. This means that you need to have RandR set up in your _xorg.conf_. (Alternately, you can hope that your Linux version has a graphical X configurator that understands how to set this up once and preserve it afterwards. Let us assume that you are not in this situation.) Assuming that you already have an _xorg.conf_ to start from, here is what you need, based on [[my experiences DualHeadedATIRandR]] with an ATI Radeon. (I am going to assume that you are familiar with _xorg.conf_ syntax in general.) * first, you need a "Monitor" section for each of your monitors. These days I believe that the only important thing in it is the _Identifier_, and whatever created your _xorg.conf_ has probably already set these up for you anyways. * next, you need to map XRandR outputs to monitors. This is done in the "Device" section for your graphics card with directives that look like: _Option "Monitor-DVI-0" "monitor1"_ \\ _Option "Monitor-VGA-0" "monitor2"_ What you put after the _Monitor-_ is whatever _xrandr_ prints out as the labels of your available outputs. * finally, you need to tell XRandR how the outputs should be laid out. You do this in the "Monitor" section for at least one of your monitors, with the appropriate one of the LeftOf, RightOf, Above, or Below options: _Option "LeftOf" "monitor1"_ (Note that there are [[potential issues DualHeadedATIRandR]] in some setups about how you map your physical monitors to card outputs.) Now there's a potential complication. XRandR places outputs within a virtual screen, and this virtual screen has a maximum size that is generally decided by defaults inside your graphics driver. It is possible that the default maximum virtual screen size will not be large enough to lay out all of your displays. To see if this affects you, run _xrandr_ and look at the information it tells you about your screen, for example: > _Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 1280 x 1200_ At a maximum size of 1280x1200, this setup does not have a large enough virtual screen to be dual-headed with two standard 1280x1024 LCDs. To fix this you need to tell the driver to use a larger maximum virtual screen size, which is done with the _Virtual_ directive in the "Screen" section's "Display" subsection: > Section "Screen" > [...] > Subsection "Display" > Virtual 2560 1024 > [....] > EndSubSection > EndSection I currently specify the exact virtual screen size that I'm going to need. I don't know what the effects of specifying a larger than necessary virtual screen are (it probably depends on the driver), but since I'm hard-coding everything else anyways I figure that I might as well be conservative. (If nothing else, I don't have the desktop space to add a third display.)