Compiz. Maybe you’ve heard the buzz, the pictures and videos, and spent the past few weeks in absolute agony over the coolness of it all. Okay, maybe you haven’t - but I have. I could rant on and on about why this is the absolute coolest thing ever. An OpenGL powered desktop, Composite, OSX-rivalling effects, and works on ATI cards? At first I thought it to be too good to be true. Yet, there are the screenshots, the forum posts, and everywhere people seem to be talking about it. So why not give it a shot?
Pros:
- No compiling, all packages downloaded from Ubuntu repositories.
- Userspace compiz startup configuration.
- Works with both fglrx/ATI and Nvidia cards.
- Cooler X functionality, more responsive GUI.
- Impress your friends.
- You know you’ve been aching to try it.
Cons:
- Recommended dist-upgrade to Dapper.
- Requires proprietary 3d acceleration drivers, reasonable card.
- Beta and somewhat buggy software.
- Video playback issues (mostly on ATI cards).
- Getting your feet wet.
The problem is, I’m lazy. I don’t want to dirty up /opt/, don’t want to cvs X.org, don’t want to hack anything I’ll have to remove later. So when the first round of make-filled instructions came out, I waited. If you’re a little less excited than I am, perhaps you’re thinking of waiting a while until it’s working in Dapper. Here’s the thing: thanks to a few brave souls, it already is. What?! you say? Okay, it’s quite beta, but that’s part of the fun, right? And you won’t have to compile anything, so it’s like beta without the beta. In just 3 steps, we can do it.
That’s not so bad, is it?
One last thing before we start playing: please do not hold me responsible for any possible side effects you experience from using this tutorial. Remember, more can be learned from what breaks in the beginning than what works the first time.
The Real Stuff
Note: I will not cover installing proprietary 3d acceleration drivers within the scope of this tutorial, and assume you have them installed already. If you do not have acceleration set up before following this Howto, your Xgl performance will probably be too slow to be usable. However, installing these drivers is quite easy, only requiring a few extra packages and possibly a configuration change. Consult the Ubuntu website and wiki for information on installing nvidia-glx for Nvidia cards or fglrx for ATI cards.
Step one
Let’s add dapper sources to apt. If you are one of the lucky ones already running it, skip to the next step. Otherwise, just throw this line in /etc/apt/sources.list/:
apt-get update, apt-get dist-upgrade, and you’re good to go. As has been mentioned in some feedback, this can take a long time, especially for those without very fast connections. However, I would recommend it for this tutorial. My main man Exdaix reports that trying to pull down the Compiz package on Breezy ended up pulling down a lot of Dapper packages anyway… so be cool like him, and dist-upgrade.
Step two
Let’s pull down some new stuff. Since around 15 February, everything you need should be in two packages. Ubuntu has now split the Compiz window manager components into separate packages. Depending on your desktop environment, add compiz-gnome or compiz-kde to this list. Open a terminal, and:
Okay! Compiz and everything we need is installed.
Step three
Now, everything we need is ready. We just have to invoke it. My technique of preference is to stick everything in userspace scripts, rather than create symlinks or modify gdm.conf-custom. I do this because (like before) I’m lazy, and would rather not make system-wide changes if I don’t have to. So, open your favourite text editor. Throw this little passage in ~/.Xsession (and create if necessary):
(Credit for the original version of this script goes to http://doc.gwos.org/index.php/Installxgl.)
Note: I have an ATI card. If you are using Nvidia, try replacing Xgl :1 -fullscreen -ac -accel xv -accel glx:pbuffer & with Xgl :1 -fullscreen -ac -accel xv:fdo -accel glx:pbuffer &.
If you want to run KDE, try replacing gnome-window-decorator with kde-window-decorator, and exec gnome-session with exec startkde.
# Start up Xgl, compiz, and GNOME
# Run Xgl server on :1, on top of normal X
Xgl :1 -fullscreen -ac -accel xv -accel glx:pbuffer &
# Tell subsequent X programs to access the Xgl server at :1
DISPLAY=:1
# Start Compiz window manager
gnome-window-decorator &
compiz gconf decoration wobbly fade minimize cube rotate zoom scale move resize place menu switcher &
# Start GNOME
exec gnome-session
Now make sure it’s +x’d/executable with chmod +x ~/.Xsession.
We have now set up your user X session to start the Xgl acceleration on top of regular X, initialize Compiz, and then start Gnome in the new GL-groovified layer. Do note that since Gnome is running on top of our Xgl layer, Gnome and your desktop applications will be running on the Xgl display :1 instead of the usual :0.
Try ‘Er Out!
Let’s see if what we did worked. Now cross your fingers, clamp your eyes shut, and reverently whisper “gui acceleration.” Yes, you’ll have to close this Howto. Try to hold back the tears, however hard that may be. Here’s what we’ll do. In just a moment, log out of Gnome. Then open that menu at the bottom left and change the session: make sure you’ve selected the default session setting, so that our .Xsession file is run.
But wait, where’s my fallback plan? What if things go wrong? If anything breaks or starts acting scary, just close down, reboot, or somehow intervene. If you wish to undo, simply go back to GDM and change the session to “Failsafe Gnome.” The .Xsession file responsible for initializing the Xgl layer should not run, and you can delete it in the comfort of your gui environment. In the worst case, you can log into single user mode from grub and delete the file there. I include this because I know it’s no fun to be left with a non-functioning X configuration without knowing how to undo it - only because I’ve been there so many times. This is not rocket science, but it *should not* torch your system. However, know that there are lots of options.
If things work, you’ll see a checkerboard pattern come up on login, followed by a blue background. The Gnome splash screen will then fade and wobble in with the most rockin’ graphics you’ve ever seen. Come right back here and I’ll show you what you can do with your new bling machine. Now, go do it! May the geforce be with you, and all that.
<












0 comments:
Post a Comment