I was recently provided with an exceptionally nice Lenovo T61 laptop for work. The screen provides a resolution of 1680x1050, which is great. Unfortunately for me, my primary workstation consists of four monitors, which makes moving to a tiny little laptop screen with really small text at that resolution quite painful.
Thankfully, the laptop comes with a VGA output so I began the task of setting it up with a dual-head display. The last time I did this was at least seven or eight years ago; the challenge, of course, is that the laptop is running Fedora 10, a distribution that I have only started using recently.
The lack of an xorg.conf file did not help matters much, and the display settings configuration tool that was provided continually reset the configuration to mirrored mode, preventing me from having anything more than the same thing displayed on both screens.
The first thing I did was to get a working xorg.conf. This can be done by installing the system-config-display package, which was not installed by default:
# yum install system-config-display
Then, as root, execute the system-config-display program. Oddly enough, the tool itself did not work either. It claims to be able to do dual-head support, but it must be restricted to using two different video cards. The video card in this laptop is an Intel GM965/GL960 and it powers both the laptop screen and the attached monitor.
Fortunately, even without changing anything in the tool, an /etc/X11/xorg.conf configuration file will be written upon quit, which allowed me to manually configure things. At this point, it all became very easy.
The following is largely for screens that are side-by-side. If you need the screens in a different configuration, such as one above the other, it might be more difficult. As well, I have not found a way to reposition the monitors; the external display is on the left while the laptop screen is on the right.
In /etc/X11/xorg.conf, find the Screen section, and add a Virtual keyword to the Display subsection. The appropriate part of my xorg.conf is below:
#Viewport 0 0
Virtual 3360 1050
The Virtual keyword defines the full size of the two combined displays. In this case, both screens are 1680x1050 in a horizontal configuration, so the full size of the display is 3360x1050. Adding that single line to the configuration, and restarting X, was all that was required.
The nice thing here, as well, is that if you power down the system, disconnect the screen, and power it up again, the display is constrained to the laptop screen. Nothing is floating off or to the side, as with older, virtual "oversizing" of the desktop where you had to push the edges of the screen with the mouse to get around the entire desktop. X knows exactly what to do when the external display is connected and when it is not. No re-configuration is necessary in either situation, which makes it automatic and seamless.
Get the PDF version of this tip here.
Delivered each Tuesday, TechRepublic's free Linux and Open Source newsletter provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!
Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.