| Home | feedback@mugginix |
12th, November 2009.

Unfortunately for Linux users who want to use more than one graphics card in a multi monitor setup, there's a bit of a catch. In order to make your desktop seamlessly span the multiple cards, you need to enable Xinerama. And, when Xinerama is enabled, you can no longer use a composited deskop. No more 'wobbly windows', true transparancy, and the higher performance compositing brings to a windowed environment. Well thanks to the guys that developed XGL, and to d2globalinc for having testing it as a way to work around the Xinerama/Compositing, we can now have our cake and eat it to. There are some draw backs to using XGL though. It's no longer maintained, so if something comes along that breaks it, we'll be outta luck. Also full screen GL aaccelerated applications can also have problems.
Not withstanding its problems in certain situaltions, it's all we have at the moment for tripple head and more monitor setups. ATI's Eyefinity cards will support more than two screens per card so this would present the best hope we have although there is the Matrox 'DualHead2Go' and 'TrippleHead2Go' that provide hardware work arounds that may be usefull to some. Of course the best solution would be for the X developers to fix X so that we didn't have this problem in the first place, but there's no one working on this at the moment, and may never be.
So, for most of us, all we have is d2globalinc's solution unless we buy more hardware. So in order to implement his work-around, we need to go through these steps. Here, I'll be assuming we're using nVidia graphics cards. If you're prepared to use ATI cards, and therefore deal with their drivers, a better option might be to buy an Eyefinity card.
Once it's installed, apply any updates that are available. To do this,

Start the "System Settings" tool

Choose "Add and Remove Software"

Click "Software Updates" on the left.
If any updates are available, do the followinng, otherwise skip to step 2.

Click "Select all updates"

Press “Apply”

Enter your password to enable the package updates

Packages will download and install.
Once updates are applied, and for thoroughness, reboot your system.
The nVidia drivers are currently available via these links.

Click "Download"

Click "Agree & Download"

Save it to your home folder.

Wait for the file to download.

Once downloaded, start Dolphin, right click the driver file and choose properties.

Go to the Permissions tab and check "Is executable" and click "OK"
Download the xserver-xgl package. It's available in either 32 or 64 bit from the following links.
You might want to print or write down these steps as we must stop the X server to complete the installation of the driver.

Pressing CTRL-ALT-F1 gets you here.

Once logged in, you'll be in your home folder.

type "sudo stop kdm" to stop the X server.
 

Type "sudo ./NVIDIA", and tap the TAB key to complete the command and press enter to start the installer
Follow the prompts in the installer.
By allowing the installer to modify the xorg.conf file this 'enables' the driver.
Now , start X again by typing "sudo start kdm"
You should see the graphical login screen appear.
(If X refuses to start, there's a problem, and the xorg.conf file will need to be corrected.)

Compositing is disabled. The nVidia driver probably isn't running.

Compositing goodness. Just what we want to see.
 
Start the "NVIDIA X Server Settings"
It needs to be started with 'root priveleges'.
To do this press ALT-F2 and in the text field, type "kdesudo nvidia-settings"
Enter your password.

Press ALT-F2 and type "kdesudo nvidia-settings" into the text field.

Enter your password to enable the settings tool.
 
Choose the "X Server Display Configuration" item and setup your screens as required.
I set mine up as follows.

Choose "X Server Display Configuration"

Select a screen to enable and click "Configure"
Where possible, a screen should be enabled as “Twinview”, otherwise as “Separate X screen”

Twinview is the preferred option.
 

If a screen needs to be enabled via "Separate X screen", you'll also need to enable Xinerama.
You can also drag the screens around to arrange them to reflect their physical locations.
Once you're happy with the settings, you'll need to save the configuration.

Save the X Configuration File

Click the "Save" button.
If an error about multiple X screens using absolute positioning appears you should be able to just click OK, and then choose "Save"
Quit from the NVIDIA X Server Settings tool.
To enable the extra screens that have just been turned on in the X Server Settings tool we need to restart the X server. To do this;

Click "ResetX Server".
If all went well, log back into the desktop.
You should be greated by your extra screens displaying the desktop, bu when Xinerama is enabled, compositing gets disabled, so you'll loose transparency from the panel, etc.
If the login screen didn't display itself again, you'll need to trouble-shoot or delete your xorg.conf
Start the "System Settings" tool.
Choose "Add and Remove Software"
Type compiz into the text field and press enter.
Select the following packages for installation.
Press Apply
When the installer notifies you of which packages will be installed, click "Install Now"
The installer will resolve any dependencies and notify you of additional packages it requires.
Click OK
If it asks for your password, enter it.
The installer will now download and install the packages.
The installer will resolve dependencies.
OK the dependancies.

Type compiz into the text field and press enter

Press "Apply" after selecting the required packages

Click "Install Now"

Click "OK" to the additional packages.

If the installer requires your password, enter it here.

The installer will download and install the packages.
Now that the compiz packages are downloaded and installed, we can install the xserver-xgl package that was downloaded earlier.
Start Dolphin and click on the package file you downloaded. The package installer should start.

Click the xserver-xgl package

The installer will start. Click "Install Package"

Enter your password.

Package is installed. Click "Close"
This is done with a simple script file placed into your .kde/env folder.

Enter .kde/env a the end of your home directory in the location bar.

Right click an empty part of the window and select "Create New" and "Text File". Name the file compiz.sh
Insert the following text into that file
#!/bin/bash
# Use compiz as the windows manager.
export KDEWM=/usr/bin/compiz.real
Save the text file and quit Kate.

Right click the new file and open it with Kate
 

Past the following text into the window, save the file and exit Kate.
Now we need to make that file executable. To do this,

Right click compiz.sh and select “Properties”

Check the "Is executable" option and click "OK"
There's two ways to go here. You can either download d2globalinc's patch file and apply it to your xsession file, or download a file that's already patched for Karmic from the link below and add it to you system.
Patched file for Karmic.If you download the file from the above link, before you copy it to the correct location you'll need to make it executable.

Right click Xgl-session and choose "Properties"

Check the "Is executable" option and press "OK"
Now, to copy the file to a system area, we need "root privileges." The easiest way to do this is from the folder that contains the file, press the F4 key which will show a terminal, and enter the following command.
sudo cp Xgl-session /usr/share/xserver-xgl

The F4 key brings up a console
 

Enter "sudo cp Xgl-session /usr/share/xserver-xgl" and press enter. Then enter your password when asked.
That should be everything done. Now there's just one more thing to do. Restart the X Sever, and hopefully you'll be greated with a composited desktop with Xinerama enabled.
Logout of the desktop, and log back in.
You should now be facing a face full of screens with Xinerama and Compisiting enabled. You should now go to the CompizConfig Settings Manager and enable wobbly windows, and other effects to your hearts delight.
I'd like to thank d2globalinc for his work that this page is based on. Without it, I'd be stuck with two separate X desktops until I can get my hands on an ATI Eyefinity card.