I've spent the last day and a half trying to get compositing working in ubuntu. This is actually an amalgamation of a bunch of guides I've found; I shouldn't be given full credit for this.
The first thing you need to do is install xcompmgr and transset. These are found in the hoary universe repositories, if you havent already done so, enable the universe repo in your /etc/apt/sources.list. Its not very hard to do this, search the forums for how to do it
Code:
代码: 全选
sudo apt-get install xcompmgr transset
Now, the next thing you have to do is actually enable compositing. This is done via a simple edit of your /etc/X11/xorg.conf
Code:
代码: 全选
sudo gedit /etc/X11/xorg.conf
Code:
代码: 全选
Section "Extensions" Option "Composite" "Enable" EndSection
As I said earlier, if you have an nvidia card it'll run better. I'm assuming you've already installed the nvidia binary drivers and such, if you haven't then do so. Add the following lines to the "device" section:
Code:
代码: 全选
Option "RenderAccel" "true" Option "AllowGLXWithComposite" "true"
"AllowGLXWithComposite" is a command that allows you to use OpenGL while compositing is running. Apparantly it can be buggy, though, so if you have problems you might want to disable compositing in your xorg.conf whenever you want to use opengl (just comment out the compositing option with #)
Now, if you have an ati card, add these lines instead:
Code:
代码: 全选
Option "backingstore" "true" Option "AllowGLXWithComposite" "true"
(Since I don't own an ati card, I apologize if any of my facts are incorrect. If someone with an ati card can correct me, I'll make sure to update this.)
OK, now for the really fun part. We're going to actually set it so compositing is enabled when you start GNOME. Go to system -> preference -> sessions. Go to startup programs, and click "add."
Now, before I continue, I'm going to explain a few of xcompmgr's options:
-c : enable shadows
-s : enable simple shadows
-fF : enable fadeins/fadeouts
You can mix-and-match those commands. For example, if you want just shadows, use xcompmgr -c. If you want simple shadows, use xcompmgr -s. If you want to enable shadows and fadeins, use xcompmgr -cfF. I wouldn't recommend using -cs; that'll probably break the program.
So, where it asks you for the command, enter xcompmgr and then the argument. For example, if you'd like to enable shadows and fadeins/fadeouts, you'd enter:
Code:
代码: 全选
xcompmgr -cfF
Alright! Now you can restart X (ctrl+alt+backspace), log back in, and you should have compositing running!
Using Transset
This is just an extra little command. If you want to set certain windows as transparent, then run the command "transset" in the console. Your mouse will turn into a crosshair; simply click on the window you want to set as transparent. The transparency value can be anywhere from 0 (completely transparent) to 1 (opaque.) It defaults to .75, and back to 1 if the window is already transparent.
For example, if you want to make a window half-transparent:
Code:
代码: 全选
transset 0.5