Xgl/Beryl on Ubuntu/Gnome - the Kombatant Way [updated 6/10/2006]
So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it. I've updated it too, and now instead of Compiz it uses Beryl, which imo is much better and has much more potential.
Before we start, I want to make clear that 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). We have an excellent how-to here in the wiki (here: Ubuntu), which works - try it out!
- 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 in order to add the two repositories that are of interest here.
#Beryl Repositories for Dapper Drake (Ubuntu 6.06) deb http://xgl.compiz.info/ dapper main deb-src http://xgl.compiz.info/ dapper main
#Beryl Repositories for Edgy Eft (Ubuntu 6.10) deb http://xgl.compiz.info/ edgy main-edgy deb-src http://xgl.compiz.info/ edgy main-edgy
- After you add the repos in the sources.list file, issue the following commands:
wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 beryl emerald-themes
- If during the apt-get installation you get the error "trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core" issue the following two commands to continue:
sudo dpkg-divert --package xserver-xorg-core --divert /usr/share/man/man1/Xserver.1x.gz.xgl --rename /usr/share/man/man1/Xserver.1x.gz
sudo apt-get -f install
- Instead of messing with gdm.conf and gdm.conf-custom, we're going to do something better. From the terminal, issue the command:
sudo gedit /usr/bin/startxgl.sh
and add these as contents:
Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1 exec gnome-session
Save it, and then issue the command:
sudo chmod 755 /usr/bin/startxgl.sh
- From the terminal again:
sudo gedit /usr/share/xsessions/xgl.desktop
and add this as its contents:
[Desktop Entry] Encoding=UTF-8 Name=XGL Exec=/usr/bin/startxgl.sh Icon= Type=Application
- 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. 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.
- After all that, we are ready. Reboot your machine (yes, reboot) and when GDM loads, look at the sessions; if you see an "XGL" session there, everything's going according to plan. Load it up (make it your default session, if you want to), and hopefully everything will be working. We're half-way there anyway. All you need to do now, is open the System->Preferences->Sessions->Startup Programs and add the following:
xmodmap /usr/share/xmodmap/xmodmap.us gnome-settings-daemon beryl-manager
Of course, if you are using a different locale, you can substitute xmodmap.us with your appropriate file.
- Logout and login again. If everything is running along happily, you'll see the beryl splash screen, and the emerald-like icon of beryl in your tray. If beryl doesn't load initially, just right click the icon, and Select Window Manager->Beryl. Now right click the icon again, and load up Emerald (the window decorator) and choose the theme that you like best. You can also tinker with the settings at your heart's content.
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.