How to configure X11 for Compiz Fusion Debian Squeeze

This tips continuing the how to last week, please read them first to get a further infos. After installing Compiz Fusion and Nvidia Driver on Debian 6, the next part is a bit tricky – we need to modify the file /etc/X11/xorg.conf. By default, this file does not exist on Debian Squeeze, so we have to generate it (in case the file already exists on your system, make a backup now so that you can restore your xorg.conf in case anything goes wrong).

1. To do this, we need to stop the Gnome display manager, which means you will not have a graphical desktop for a few minutes; instead, we have to go to the console (This will stop the desktop):
[sourcecode language=”bash”]
/etc/init.d/gdm3 stop
[/sourcecode]

2. Press Alt + F2 to open a console. Log in as root. Type and run X -configure. This will create the file xorg.conf.new in root’s home directory (you might see some error messages at the end of the output of the command, but usually you can ignore these). Move that file to /etc/X11/xorg.conf type: mv ~/xorg.conf.new /etc/X11/xorg.conf

3. Run nvidia-xconfig This will adjust our /etc/X11/xorg.conf so that the right Nvidia driver is used.
4. Open the configuration: vi /etc/X11/xorg.conf
5. Add the following section (for example before the “Device” section)
[sourcecode]
[…]
Section "Extensions"
Option "Composite" "enable"
EndSection
[…]
[/sourcecode]

also In Section “Device”, add the following lines:
[sourcecode]
[…]
Option "AllowGLXWithComposite" "true"
Option "TripleBuffer" "true"
Option "XAANoOffscreenPixmaps" "true"
Option "RenderAccel" "true"
[…]
[/sourcecode]

and In Section “Screen”, add the following lines:
[sourcecode]
[…]
Option "AddARGBGLXVisuals" "true"
Option "AddARGBVisuals" "true"
[…]
[/sourcecode]

6. start the desktop again /etc/init.d/gdm3 start
7. If your desktop did start with your new xorg.conf – fine! just go on. Login become a root and check if your desktop is ready to use 3D effects glxinfo | grep direct
[sourcecode]
root@debian:/home/emka# glxinfo | grep direct
direct rendering: Yes
GL_EXT_Cg_shader, GL_EXT_depth_bounds_test, GL_EXT_direct_state_access,
root@debian:/home/emka#
[/sourcecode]

8. Finish, you can login and start Compiz Fusion manually.

Have a problem? Happy struggling guys! haha…