I was just thinking about how difficult it was for me to setup dual monitors on my Ubuntu system. I read numerous articles and tutorials about how to get it up and running. The configuration settings were different for each person so it was hard to get it right. After hours searching and hours of tweaking the settings, I finally got it how I like:

dscn0952.JPG

Now I’m able to drag windows from one monitor to the other, maximize windows to each of the monitors, and do everything else that Windows dual monitors can do, too.

I’m running Ubuntu 6.10 with a VGA Leadtek (GF6600 PX6600TD-256 R) graphics card. The exact model isn’t that important. It’s an NVidia-based card so the instructions should be the same so long as you have one, too.

I assume that at this point, both your monitors aren’t working. You’re only using one. Whenever I tried using two (before I configured everything, that is) I would get full-screen static and color bars. I could only use one monitor at a time and make the changes with that one, shut down, plug the other back in, restart, and see if they both worked. Then repeat that cycle until I was finally able to get them working with each other.

1. Download and install the NVidia drivers

In order for Ubuntu to recognize your graphics card the way we want it to, you have to install the right driver. You can find instructions on how to do this here. It’s really easy using Synaptic, the built-in package manager.

2. Open your Xorg.conf file

This is your graphics configuration file. Before we edit it, we definitely want to make a backup. Do this by opening up the terminal and typing “sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup”. Then type “sudo gedit /etc/X11/xorg.conf” and enter your root password to continue. A text editor will open up for you to edit.

3. Edit your Xorg.conf file

In the “Screen” Section, you need to add some code:

Option "NvAGP" "2"
Option "NoLogo" "1"
Option "RenderAccel" "0"
Option "ConnectedMonitor" "DFP, CRT"
Option "NoPowerConnectorCheck" "1"
Option "TwinView" "1"
Option "Metamodes" "1280x1024,1280x1024; 1280x1024,1280x1024; 1152x864,1152x864; 800x600,800x600; 1024x768,1024x768; 1280x1024,NULL; 1024x768,NULL"
Option "TwinViewOrientation" "LeftOf"
# Option "NoTwinViewXineramaInfo"
Option "AddARGBGLXVisuals" "True"

So the three critical parts of my Xorg.conf file, the Monitor, Device, and Screen section, each looks like this (beware that yours will not be identical):

Section "Monitor"
Identifier "Generic Monitor"
HorizSync 28.0 - 51.0
VertRefresh 43.0 - 60.0
Option "DPMS"
EndSection

Section "Device"
Identifier "NVIDIA Corporation NV43 [GeForce 6600]"
Driver "nvidia"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "NVIDIA Corporation NV43 [GeForce 6600]"
Monitor "Generic Monitor"
DefaultDepth 24
Option "NvAGP" "2"
Option "NoLogo" "1"
Option "RenderAccel" "0"
Option "ConnectedMonitor" "DFP, CRT"
Option "NoPowerConnectorCheck" "1"
Option "TwinView" "1"
Option "Metamodes" "1280x1024,1280x1024; 1280x1024,1280x1024; 1152x864,1152x864; 800x600,800x600; 1024x768,1024x768; 1280x1024,NULL; 1024x768,NULL"
Option "TwinViewOrientation" "LeftOf"
# Option "NoTwinViewXineramaInfo"
Option "AddARGBGLXVisuals" "True"
SubSection "Display"
Depth 1
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

3. And finally, restart. Plug the other monitor in and hopefully, (cross your fingers!), both your monitors will be working.

Of course you may need/want to change some settings. I can’t guarantee that these will work for you but those are the steps that I took to get it working. Good luck!