-->

Xgl Page

If you're looking for the old and outdated page, see OldXglpage.

This is a short guide to getting GNOME with xgl running on Ubuntu Edgy. I'm running Edgy on an AMD64 machine with an ATI Radeon card but hopefully this guide will be helpful to others as well. These instructions work well for me, in particular I no longer get the dreaded "No GLXFBConfig for default depth, this isn't going to work" error message. If they work for you too, that's great. If not, you're on your own. Xgl seems to be a very fragile beast, depending on your cpu/graphics card/phase of the moon/etc. Googling for something like "xgl compiz your_graphics_card_here" may be helpful. Putting in fragments of error messages in the search may also reveal interesting things.

This guide assumes that you already have an fglrx driver with working DRI (direct rendering) installed and that you have all the standard Ubuntu Edgy packages enabled in /etc/apt/sources.list It is probably also a good idea to enable the Quinn repository. Do this by adding the lines

deb http://xgl.compiz.info/ edgy main-edgy main-edgy-amd64

to your /etc/apt/sources.list.

For reference, my /etc/X11/xorg.conf is here.

Start out by doing

sudo apt-get install xserver-xgl compiz-core compiz-plugins compiz-gnome

which gives you Xgl (the new X server) and compiz (the window/compositing manager).

Now you will need to modify some configuration files to get GDM to give you a proper Xgl/Compiz session.

Edit the file /usr/share/xsessions/xglgnome.desktop with your favourite text editor and make sure it contains

[Desktop Entry]
Encoding=UTF-8
Name=xglgnome
Comment=
Exec=startxgl-custom
Icon=
Type=Application

The next step is to edit /usr/local/bin/startxgl-custom and type in the following:

#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1 gnome-session

The next file is the one that runs the Compiz window/compositing manager. Create /usr/local/bin/compizrc and fill it with the following: (this script was modified from these instructions for ArchLinux)

#!/bin/bash
if [ `ps -A | grep Xgl |grep -v grep | wc -l` == "1" ]; then
xset fp= /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled\
,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1\
,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi\
,/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType

xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server"
compiz-start
fi

The xmodmap line works around a bug that otherwise makes it very easy to accidentally restart your X server.

Now make the above scripts executable:

sudo chmod 755 /usr/local/bin/compizrc /usr/local/bin/startxgl-custom

Finally, add the compizrc script to your GNOME session by going to the menu System->Preferences->Sessions, click the Add button and type "compizrc".

That should be all. Now log out of GNOME. When you're back to the GDM login manager, hit Ctrl-Alt-Backspace to reload the X server. GDM should come back up and when it does, click the "Session" button and select "xglgnome". If you're lucky, a composited desktop with all the eyecandy should now start.

Happy Xgl'ing!