Theres lots of good guides on the Ubuntu forum... a lot depends on what graphics card you are running. You also need to be running Dapper Drake.. (or more specifically modular XOrg 7)
Briefly, this is how i got it to work on an ATI Mobility 9600 (supposedly one of the more fussy cards):
Install ATI Proprietary Driver and kernel modules and then configure xorg.conf to use fglrx
Code:
sudo apt-get install xorg-driver-fglrx
sudo apt-get remove linux-restricted-modules-$(uname -r)
Then install XGL, Compiz etc...
Code:
sudo apt-get install xserver-xgl compiz compiz-gnome libgl1-mesa libgl1-mesa-dri libglitz1 libglitz-glx1 transset
Create an init file called /usr/bin/startxgl.sh The init file should be executable (chmod 755 <file>), and contain something like:
Code:
#!/bin/bash
Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1 gnome-session
Then create a file called /usr/share/xsessions/xgl.desktop, containing:
Code:
[Desktop Entry]
Encoding=UTF-8
Name=XGL
Exec=/usr/bin/startxgl.sh
Icon=
Type=Application
Restart your machine and then Xgl should appear as a Session option on the login screen (where you select between GNOME, KDE, etc).
Then when you login open a terminal and type:
Code:
compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place menu switcher
Code:
xmodmap /usr/share/xmodmap/xmodmap.uk
After this everything may work,... XGL is still very experimental and quite hard to get to work... personally i like it performance is good..the cube is quite cool (ctrl+shift+left/right) and the expose-like effects (F12) a great improvement. I do like the vista-like alt+tab... especially when a video is playing and you see it playing in the alt+tab window