Props to WattsMD and Dual Monitor HOWTO for helping me get this going.

Recently, a friend in my local LUG gave me about 7 monitors, just to get them out of his place. Ever since then, running dual monitors has intrigued me...

Some newer video cards have the option of dual monitors, but I chose to use two video cards, as going that route is often less expensive. First, make sure both of your cards work in X. That step is covered in numerous HOWTOs at other sites.

Next, in text mode, type
 XFree86 -scanpci
That will show all of the PCI BusIDs of your system. The ones to focus on are those of your video cards.

Next, you'll need to make an XF86Config file containing the configurations to both of your video cards and the monitors attached to those cards. Be sure to add an the BusID entry for the Graphics cards:

 Section "Device"
	Identifier  "Card1"
	Driver      "ati"
	VendorName  "ATI"
	BoardName   "Radeon QD"
	BusID       "PCI:0:11:0"
Notice the entry for BusID for the graphics device. This entry is especially important if the two video cards you use are the same type.

Next, you'll need to make screens for each of your cards. You need to give each screen a unique identifier for use later:

 Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	DefaultDepth 24
	SubSection "Display"
		Depth     24
		Modes "1024x768"
		ViewPort 0 0 
I only use 24 bit color depth and 1024x768 resolution, but if you use other resolutions/depths, you can add them in as well.
Now, all you need is to tell X how you want the monitors situated. This is done in the ServerLayout section:

 Section "ServerLayout"
	Identifier     "Layout"
	Screen     0  "Screen0" 0 0
	Screen     1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
X allows you to specify how the screens are layed out. Notice I have two entries for Screen. The first one specifies which screen will be the primary display, or :0.0 . The Second entry tells where the other screen will be. You can tell it relatively, using RightOf, LeftOf, Above, or Below, or you can use absolute resolutions. The HOWTO I mentioned above has some good examples on using absolute resolutions.

Note that I'm only covering the video hardware; you still have to configure the keyboard, mouse, font paths, etc. I used an already working XF86Config file and kept all of that information, only adding my cards' configs.

Certain Windowmanagers allow you to run multiple desktops on multiple displays, i.e., Each screen acts like an independant desktop. I had varied experiences using this, but this is the default behaviour when not using xinerama.

Xinerama allows X to use two displays as one desktop. This desktop is usually the combined size of the two screens, unless you use the above mentioned absolute resolutions and make the screens overlap or something.

In order to use Xinerama, you must enable it when starting X. You can just do it from a command line using:
 startx -- +xinerama
But if you always want it to start that way, you can edit the /usr/X11R6/bin/startx script. In Slackware 8, and I assume it's similar in other distros, the startx script is fairly detailed. It allows you to input server options in a variable, which will be passed to xinit as options.

In /usr/X11R6/bin/startx, find the line that says:
and change it to
Now, X will start by default with xinerama enabled.

If all goes well, you should have a multiheaded display with a desktop spread across two screens.

I don't know if anything needs to be edited to work with xdm/kdm/gdm login screens, but if I find anything out, I will be sure to add it into either this thread or the article for the Grasshopper Journal I plan to write.

I hope somebody benefits from this! Dual monitors ownz j00!