-->

Old Xglpage

Newer update: you will probably find XglPage more useful.

Update: this page has been rendered obsolete by the inclusion of Xgl in Dapper

This is a short guide to installing xgl. I'm running Ubuntu Dapper on an AMD64 machine with an ATI card but hopefully this guide will be helpful to others as well.

Start out by grabbing David Reveman's tarball from http://freedesktop.org/~davidr/xgl-svn_100.tar.bz2 .

You will also need most of the x11 development packages. The ones I have installed on my machine are

libx11-6
libx11-dev
libxau-dev
libxau6
libxcomposite-dev
libxcomposite1
libxcursor-dev
libxcursor1
libxdamage-dev
libxdamage1
libxdmcp-dev
libxdmcp6
libxext-dev
libxext6
libxfixes-dev
libxfixes3
libxfont-dev
libxfont1
libxft-dev
libxft2
libxi-dev
libxi6
libxinerama-dev
libxinerama1
libxkbfile-dev
libxkbfile1
libxklavier10
libxmu-dev
libxmu-headers
libxmu6
libxmuu-dev
libxmuu1
libxp6
libxpm-dev
libxpm4
libxrandr-dev
libxrandr2
libxrender-dev
libxrender1
libxres1
libxss1
libxt-dev
libxt6
libxtrap-dev
libxtrap6
libxtst-dev
libxtst6
libxv-dev
libxv1
libxvmc1
libxxf86dga1
libxxf86misc1
libxxf86vm1
x11proto-bigreqs-dev
x11proto-composite-dev
x11proto-core-dev
x11proto-damage-dev
x11proto-fixes-dev
x11proto-fonts-dev
x11proto-input-dev
x11proto-kb-dev
x11proto-randr-dev
x11proto-record-dev
x11proto-render-dev
x11proto-resource-dev
x11proto-scrnsaver-dev
x11proto-trap-dev
x11proto-video-dev
x11proto-xcmisc-dev
x11proto-xext-dev
x11proto-xinerama-dev

Now unpack the tarball and do

cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login
cvs -z3 -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co app/glxcomp
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo login
cvs -z3 -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co glitz
cd glitz
./autogen.sh --prefix=/opt/fdo
make
sudo make install
cd ../app/glxcomp
./autogen.sh --prefix=/opt/fdo
make
sudo make install
export PKG_CONFIG_PATH=/opt/fdo/lib/pkgconfig
cd ../../Xserver-6.6.1
./configure --enable-xglserver --enable-glx --enable-xkb --disable-kdriveserver
make
sudo make install

Now run Xgl and Metacity with

Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1 metacity &

I've been told that those of you with nvidia cards should use

Xgl :1 -fullscreen -ac -accel xv -accel glx &

instead.

As explained by Hanno Böck, glxcompmgr needs the mesa libGL rather than the ATI version. Therefore, create some directory where your linker will not look, such as /opt/mesalibs and do

cd /opt/mesalibs
cp /usr/lib/fglrx/libGL.so.1.2.xlibmesa libGL.so.1.2
ln -s libGL.so.1 libGL.so
ln -s libGL.so.1 libGL.so.1.2

The preceding steps assume that you installed the ATI drivers through the Ubuntu package xorg-driver-fglrx. If you just downloaded the drivers from the ATI web site, your Mesa libGL will probably not be named libGL.so.1.2.xlibmesa and could have been overwritten by the ATI installation. In that case, you'll need to extract the drivers from the package libgl1-mesa.

Now open a terminal in your Xgl window:

LD_LIBRARY_PATH=/opt/mesalibs DISPLAY=:1 gnome-terminal &

From this terminal, type

/opt/fdo/bin/glxcompmgr shadow wobble &

and glxcompmgr will hopefully start. If it bails out with an error message like "GLX_MESA_render_texture is missing", it did not find your mesa libGL and is still using the ATI version.

Happy Xgl'ing!