个人工具

UbuntuHelp:CompositeManager/InstallingCompiz

来自Ubuntu中文

跳转至: 导航, 搜索

<<Include(Tag/Unsupported)>>

Introduction

This page details how to set up and run the Compiz window manager/composing manager. <!> In order to run Compiz, you need Xgl or AIGLX. This guide assumes that you already have one of these running. More information about all this is available on the CompositeManager page.

Installing Compiz

<!> You must be running Ubuntu Dapper 6.06 LTS or newer. There is different way to install compiz :

Using ubuntu official packages

The compiz package of ubuntu are quite old. It is not recommended to use them. For edgy, there is a slightly newer package in the backport section. To use it, you'll need to enable UbuntuBackports. The packages we need are compiz and compiz-gnome (or compiz-kde if you are using KDE). See Adding, Removing and Updating Applications for help with this.

sudo apt-get install compiz compiz-gnome

OR

sudo apt-get install compiz compiz-kde

Using Third party repository

Gandalfn maintain a repository of a stable and up to date version of compiz. For dapper, you may have a look there For edgy, you may have a look there

Using official compiz installation guide for edgy

The better and fatest way to install compiz on edgy, is probably to use the official guide provide by the compiz website. Instructions are there

Running Compiz

To start compiz, run compiz --replace gconf from the terminal. You also need a window decorator, which is responsible for drawing the window titlebar/frame. For GNOME users running the latest version of compiz from the backports repository, the above command is all that's necessary, because compiz will start a window decorator itself. If that doesn't happen automatically, you may need to manually start the window decorator, as outlined below. Gnome users can use gtk-window-decorator (or gnome-window-decorator if you have an older version of compiz), and KDE users can use kde-window-decorator. Each window-decorator is designed to integrate with the corresponding desktop environment. Example:

$ compiz --replace gconf &
$ gtk-window-decorator --replace &

Creating a compiz-start script

To make things easier for yourself, you can place all this in a script, for example: Start a text editor (gedit) as root with the name of the script specified:

$ gksudo gedit /usr/local/bin/start-compiz

In the text editor, paste the list of commands to run:

Free Drivers
#!/bin/bash
compiz --replace gconf &
gtk-window-decorator --replace
Non-free Drivers

Nvidia (Note that on Fiesty, it seems that the LD_PRELOAD hack is not necessary, and in fact can actually make Compiz not work.)

#!/bin/bash
LD_PRELOAD=/usr/lib/nvidia/libGL.so.1.2.xlibmesa compiz --replace gconf &
gtk-window-decorator --replace

ATI

#!/bin/bash
LD_PRELOAD=/usr/lib/fglrx/libGL.so.1.2.xlibmesa compiz --replace gconf &
gtk-window-decorator --replace

Save and quit gedit, then mark the script executable:

$ sudo chmod +x /usr/local/bin/start-compiz

You can now start both compiz and your window decorator by running start-compiz.

Making compiz start automatically when you log in (GNOME)

From the menu at the top of your screen, select "System > Preference > Sessions". Click on the right-most tab, "Startup Programs". Now create a new entry for the compiz-start script you created above:

/usr/local/bin/start-compiz

Extra: Makes Shift-Backspace NOT restart X-server; A common irritant

xmodmap -e \"keycode 22 = BackSpace Delete\"

Close the Session Preference Panel. Compiz will now start automatically when you log in.

Done! - Now what?

Let's find out about configuring compiz!

Troubleshooting

If you are using an NVIDIA chipset, you may get the following error:

compiz: GLX_EXT_texture_from_pixmap is missing
compiz: Failed to manage screen: 0
compiz: No manageable screens found on display :0.0

If so, start compiz like this:

LD_PRELOAD=/usr/lib/nvidia/libGL.so.1.2.xlibmesa compiz --replace gconf &