How to install Xgl/Compiz on Ubuntu Dapper: The Kombatant Way
So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it So here goes:
These instructions are targeted for those people using the ATI Proprietary Driver ("fglrx") and having WORKING 3D ACCELERATION. This is configured in your xorg.conf. To make sure you are "accelerated", running with the new driver, try typing fglrxinfo in a terminal and see what you get. If it talks about ATI then awesome... if it talks about Mesa, you still don't have your driver setup properly (xorg.conf). Your xorg.conf file doesn't need any special parametres - what I did was simply generate the default xorg.conf file with the command:
and replace the "ati" instance with "fglrx". Nothing more.
If you want the absolute newest stuff, then you're going to have to add some lines to your repositories. So open the /etc/apt/sources.list file as root, and add these lines:
This will add two repositories that carry the latest versions of all the Cool Stuff(tm). Then do:
Note that if you get the error
and then do a
Instead of messing with gdm.conf and gdm.conf-custom, we're going to do something better. So here goes. From the terminal, issue the command:
and add these as contents:
Save it, and then issue the command:
From the terminal again:
and add this as its contents:
And again, from the terminal:
and inside it add the following:
I can already see some of you complaining: "Hey, there is no such thing as /opt/mesa/libGL thing!! Please carry on to step 6 and everything will be cleared
So here's the trick. What we've done is to add a new session in gdm. This means that, when gdm loads, you can select the "Xgl" session instead of the normal session you usually use, and it'll load Xgl. It would be a good idea to either load /usr/bin/startcompiz from your System > Preferences > Sessions, in order for it to load automatically, or just add a link to your desktop and double-click it to work. That way, if something goes horribly wrong, you can simply reboot, and when gdm loads , you will be able to select your normal (and working) session again without editing files all the time. Now, fromhere on we have one more step to make.
And here comes the big part: the mesa libraries. I see many people having the well-known "compiz.real: GLX_EXT_texture from pixmap is missing" error, and they can't seem to find out why this happens. Well, the reason as simple and as complicated the message suggests: this certain extension is NOT supported by ATI's driver (nVidia doesn't support it either, so no need to go OMGATILOOSE etc ). So, in order to run compiz, you're going to have to resort to standard mesa libraries. But, I hear you ask, where should I find these? The answer is simple: package libgl1-mesa has them. Now read carefully: when you install this particular package via apt-get, it'll place a libGL.so.1.2 inside your /usr/lib, and a symlink file called libGL.so.1 which points to the libGL.so.1.2 file. Now, if you install the ATI drivers by using the installer, these files will be replaced by symlinks to ATI's libGL.so.1.2 which resides inside /usr/lib/fglrx. So what do you do? After installing libgl-mesa and before installing ATI's drivers, create a directory called /opt/mesa and copy the file there, like this:
Now install ATI's drivers; it will replace the files inside /usr/lib, but you'll already have the libGL file you are interested in saved in the location we created. If you have already installed ATI's drivers, and then installed libgl1-mesa, ATI's symlinks will be lost. So proceed to create /opt/mesa and copy the file there as normal; then create the two symlinks by hand, like this:
After all that, we are ready. Reboot your machine and when gdm loads, look at the sessions; if you see an "Xgl" session there, everything's going according to plan. Load it up, and hopefully everything will be working On my occassion, the login screen is a little slow, so don't panic if you see something like that. Everything should be quick once compiz is loaded. You'll also notice that the window decoration has changed; again, this is normal, for now, this is the only window decoration available. I am certain proper support for the Metacity window decorations will be added soon. When you login, you should have a "apps/compiz" section in gconf-editor. If you don't, don't worry about it; I don't either, and the effects work like a charm. To get around the problem with <Shift> and <Backspace> enter this in your terminal whenever you login:
where <lanbguage> refers to your country's code. For the US, it would be:
Or, of course, append it to the .gnomerc file.
Once everything is running along happily, this is a good appendix for the commands for using the nifty stuff compiz gives you: http://en.opensuse.org/Compiz
Hopefully somebody will find all these useful - I will also update this with more suggested information and tips, to cover more potential problems/configurations.Any additional suggestions will be more than welcome.