Compiz - Arch Linux 中文维基

跳至內容

# Compiz

出自 Arch Linux 中文维基

本文或本節內容已經過時。

原因： 請提供模板的第一個位置參數以概括原因。 (在Talk:Compiz討論)

相關文章

- Compiz/Configuration
- 窗口管理器
- 桌面環境
- Xfce
- MATE
- Unity

翻譯狀態：

- 本文（或部分內容）譯自 Compiz，最近一次同步於 2014-08-14，若英文版本有所更改，則您可以幫助同步與翻譯更改的內容。
- 您可以在 ArchWiki 的對應頁面找到本文翻譯的原始修訂歷史。
- 本文可能與英文原文存在出入。

這篇文章或章節的翻譯質量不佳。

原因：Last updated in 2016（在 Talk:Compiz# 中討論）

來自維基百科的解釋:

  Compiz 是第一個由 OpenGL 驅動的運行於 X Window System 上的混合窗口管理器 。Compiz的混合渲染能力使其可以在窗口管理過程中實現多種視覺效果，比如在矩形虛擬桌面上的窗口最小化。

## 安裝

- 2013年5月起， Compiz 在official repositories中就不再可用了。
- 安裝0.9和0.8版本的包可以在AUR (簡體中文)中找到。
- 這兩個版本不能同時安裝。

### 安裝0.9系列版本

注意：

- 從 Compiz 0.9.8 開始，所有的Compiz組件（包括CCSM、插件、gtk-window-decorator等）都是當作一個單獨項目來開發的。也就是說一個安裝包就包括了Compiz的全部組件。
- 想要帶 emerald-themes的emerald0.9, 先安裝emerald0.9AUR[損壞的連結：package not found] 再安裝 emerald-themesAUR. 相反的做法會導致依賴關係錯誤而衝突.

必需的:

- Compiz — OpenGL合成管理器與CCSM,插件和GTK窗口裝飾器.

  https://launchpad.net/compiz || compizAUR

可選的:

- Emerald — Compiz的獨立窗口裝飾器

  http://www.compiz.org/ || emerald0.9AUR[損壞的連結：package not found]

- Emerald Themes — Emerald 窗口裝飾的額外主題.

  http://www.northfield.ws/projects/compiz/ || emerald-themesAUR

- Fusion Icon — Compiz的托盤小程序並且可以切換不同的窗口管理器以及裝飾器.

  https://github.com/kozec/fusion-icon-gtk3 || fusion-icon0.9AUR[損壞的連結：package not found]

### 安裝0.8系列版本

安裝以下任意一個包：compiz-coreAUR、 compiz-gtk-standaloneAUR[損壞的連結：package not found] 或 compiz-core-mateAUR[損壞的連結：package not found]。

需要Compiz設置中心，請安裝 ccsmAUR。

需要插件，請安裝 compiz-fusion-plugins-mainAUR、 compiz-fusion-plugins-extraAUR 。 並且可選地，可以安裝 compiz-fusion-plugins-unsupportedAUR[損壞的連結：package not found]。

Emerald窗口裝飾器可以從 emeraldAUR 包中安裝。 需要附加的Emerald主題可以安裝 emerald-themesAUR 。

### 窗口裝飾器

提示：想知道更多關於選擇與管理主題的情況，請訪問：Compiz configuration#Window decoration themes。
注意：

- 大多數的Compiz軟體包都會默認提供 gtk-window-decorator （一個GTK窗口裝飾器組件）。唯一的例外則是 compiz-coreAUR 包中並沒有提供窗口裝飾器。
- 目前沒有任何一個包自動提供 kde-window-decorator （一個KDE窗口裝飾器組件）。想要安裝它，你需要編輯將要安裝的 Compiz 包中的 PKGBUILD 文件，從中打開相關的選項。當你編輯完之後，還需要重新編譯並安裝 Compiz 包。

窗口裝飾器是為程序提供窗口和邊框的程序。 不像類似mutter包之類的窗口管理器， 不像Kwin或者Xfwm只提供一個唯一的裝飾器， Compiz的用戶擁有三個選擇：Emerald、gtk-window-decorator以及kde-window-decorator。

其中gtk-window-decorator 和 the kde-window-decorator 就包含在 Compiz 的原始碼中，並且已經編譯好了（如果你的PKGBUILD文件設置妥當的話）。 而Emerald分離在外，是一個獨立的裝飾器軟體。

設置它可以按照如下步驟：

首先，確定你已經安裝了你想要在Compiz中使用的裝飾器。然後，打開 CCSM （Compiz Config Setting Manager ，Compiz設置管理器）。 你可以找到它的圖標或者在終端中運行命令： `ccsm`。在設置界面中，找到「效果」部分，並保證「Window Decoration」（」窗口裝飾「）已經勾選了。 現在，點擊「Window Decoration」（」窗口裝飾「）按鈕，並且在」命令「框中輸入跟你需要的裝飾器相關的命令：

- `emerald`

- `gtk-window-decorator`

- `kde4-window-decorator`

為了讓這些改動立即生效，你可能需要在命令的結尾添加 `--replace` 開關。 另外，註銷之後再登錄進來也可以讓你新設置的裝飾器生效。 不過請注意，在CCSM中輸入的使用 `--replace` 開關的裝飾器命令，會在用戶登錄的時候使屏幕閃一下。

## 開始使用 Compiz

### 啟用重要的插件

提示：

- 譯者注 為了大家看得方便，我把插件的名字保留了英文。因為有時候CCSM裡面也會顯示英文的插件名稱。
- 譯者注 插件的中文名稱可能翻譯得不準確。

在開始使用Compiz之前， 你需要激活一些提供窗口管理基本功能的插件。 要不然你可能連拖拽窗口都困難，更別說縮放和關閉了。

重要的插件:

- Window Decoration（窗口裝飾）——提供窗口邊框（上一節咱已經討論過了）
- Move Window（窗口移動）
- Resize Window（窗口縮放）
- Place Windows（窗口放置）——設置關於窗口在屏幕上放置的選項
- Application Switcher（程序切換）——提供 Alt+Tab 開啟的程序切換器（另外也有一些插件可以實現這個功能，而且具有不同的效果，比如 'Shift Switcher,' 'Static Application Switcher' 等等。並不是所有的切換器都是用 Alt+Tab 快捷鍵）。

想要在不同的視區之間切換，你需要激活以下其中一個插件：

- Desktop Cube（立體桌面）和Rotate Cube（旋轉立體）——提供一個可以浮空的立方體，每個面都是一個視口（虛擬桌面）。
- Desktop Wall（桌面牆壁）——視口全部並排陳列在一起（非常類似於Cinnamon 和 GNOME Shell 中的窗口切換效果）。
- Expo——當滑鼠移動到屏幕左上角的時候，顯示出全部的視口和窗口（就是Ubuntu Unity裡面那種！！）。這個插件可以單獨激活，或者是和前兩個一起用不會衝突。

### 啟動 Compiz

注意：曾幾何時，出現過一個包錯誤，導致你需要在運行 `compiz --replace` 命令時使用 `ccp` 開關才能正常導入Compiz插件。不過現在這個錯誤已經修正了，現在已經沒有任何必要使用 `ccp` 開關。

你可以使用下面的命令啟動Compiz：

    $ compiz --replace &

提示：如果 `compiz --replace &` 命令在進入會話時不管用。 試一試沒有a花的命令： `compiz --replace`。

我們來過一下常用的Compiz命令行選項吧：

- `--indirect-rendering`: 使用間接渲染 (AIGLX)
- `--loose-binding`: 可以解決一些性能問題 (NVIDIA?)
- `--replace`: 取代現有的窗口管理器（window-manager）
- `--keep-window-hints`: 在可用的視口中保留Gnome窗口管理器的 gconf-settings 設置
- `--sm-disable`: 禁用會話管理功能

#### 小工具 Fusion Icon

Fusion Icon 是一個托盤小工具，功能是在一個會話中切換Compiz和其他不同的窗口管理器以及裝飾器。 它只和Compiz 0.8版本兼容。 它可以在 fusion-iconAUR 包中安裝。

你可以用下面的命令運行 fusion-icon ：

    $ fusion-icon

為了確保Fusion-icon確實啟動了Compiz，郵件單擊它在通知區域的圖標，然後選擇「select window manager」， 如果「Compiz」還沒被選上的話就選上吧。

下面將要講到的很多方法會在桌面環境啟動時自動運行Compiz。你也可以叫桌面環境自動運行fusion-icon來間接自動啟動Compiz。 如果你想這樣做的話， 只要把Compiz的命令 （通常都是 `compiz --replace &`）改成 `fusion-icon` 就行了。

### 讓你的桌面環境自動啟動Compiz

#### KDE4

##### 使用系統設置

打開系統設置程序，並找到「系統設置 > 默認程序 > 窗口管理器 > 使用另外的窗口管理器'」然後選擇「Compiz」。

如果你需要讓Compiz使用你自己設定的選項啟動的話，就選擇「Compiz custom」，然後新建一個叫做`compiz-kde-launcher` 的腳本，並且在其中添加你希望啟動Compiz的命令。 下面是一個例子：

    /usr/local/bin/compiz-kde-launcher

    #!/bin/bash
    LIBGL_ALWAYS_INDIRECT=1
    compiz --replace &
    wait

然後還要讓他可運行：

    $ chmod +x /usr/local/bin/compiz-kde-launcher

##### Autostart 自動啟動連結

注意：

- 如果你想安裝 gtk-window-decorator，就不要新建 `compiz.desktop` 文件，因為這回產生一些問題。
- 如果 `compiz.desktop` 已經有了，那你可能需要在 `Exec` 之後添加 `--replace` 。

在KDE自動啟動（Autostart）目錄中添加一個項目。如果它不存在，就新建一個：

    ~/.kde4/Autostart/compiz.desktop

    [Desktop Entry]
    Type=Application
    Encoding=UTF-8
    Name=Compiz
    Exec=/usr/bin/compiz --replace
    NoDisplay=true
    # name of loadable control center module
    X-GNOME-WMSettingsModule=compiz
    # autostart phase
    X-GNOME-Autostart-Phase=WindowManager
    X-GNOME-Provides=windowmanager
    # name we put on the WM spec check window
    X-GNOME-WMName=Compiz
    # back compat only
    X-GnomeWMSettingsLibrary=compiz

##### 設置 KDEWM 變量

作為root用戶你需要搞一個小腳本，這樣你就可以在啟動Compiz的時候添加命令行選項了。

新建一個文件，裡面輸入啟動Compiz的命令，再加上你希望附加的設置。下面是一個例子：

    /usr/bin/startcompiz

    compiz --replace &

注意：你不一定非要把這個腳本叫做 startcompiz。只要保證你的腳本的名字不會和系統已有的命令（在`/usr/bin`目錄中）弄混就行了。

保證你的腳本可執行：

    # chmod +x /usr/bin/startcompiz

現在你需要新建一個程序來調用你剛剛在 `/usr/bin` 中新建的這個腳本了。

1) 只針對你當前的用戶設置:

    ~/.kde4/env/startcompiz.sh

    KDEWM="compiz"

2) 全系統範圍內設置:

    /etc/kde/env/startcompiz.sh

    KDEWM="compiz"

注意：

- 如果上面的方法不管用，使用下面的命令可以達到同樣的目的：

    $ export KDEWM="startcompiz"

  把它放到你用戶的 `~/.bashrc` 文件中去。

- 如果你使用了 `/usr/local/bin` 目錄那可能會不管用。那麼你需要在腳本中使用絕對路徑：

    $ export KDEWM="/usr/local/bin/startcompiz"

#### GNOME 桌面環境

##### GNOME Shell 和 Cinnamon

GNOME Shell (簡體中文) 是一個類似 mutter包 的實現插件。 同樣， Cinnamon 插件是一個類似於 muffin包 窗口管理器的實現。

也就是說，將GNOME Shell 或 Cinnamon 與 Compiz 或者其他窗口管理器同時使用是不可能的（因為他們都是窗口管理器！）。

##### Unity

確保 'Ubuntu Unity Plugin' （Ubuntu Unity 插件）在 CCSM 中啟用了，這樣 Unity 才能正確運行。

你只有正確安裝了Unity之後，這個插件才會顯示在CCSM裡面。

##### 其它的GNOME會話 (Cairo dock 和 Compiz)

gnome-session-compizAUR[損壞的連結：package not found] 包會在一個顯示管理器中添加一個新的會話。 只要在你的顯示管理器中選擇 'gnome-session-compiz' 即可。

請確保 Compiz 以及 Cairo Dock (Taskbar或Panel) 已經正確的設置好了。

在CCSM裡面，確保選擇了窗口裝飾器，已經啟用了窗口管理需要的必要插件。詳見 #啟用重要的插件.

下面是一些建議的Cairo Dock的設置：

- 在Cairo Dock上面添加一個應用程式菜單，並且記住它的快捷鍵綁定。
- 為了舒服，吧應用程式菜單的快捷鍵綁定到 `Alt+F1` 和 `Alt+F2`。
- 添加時鐘、Wifi、網速等等插件圖標到Dock上面。
- 添加一個註銷按鈕：
  - 設置註銷命令為 `gnome-session-quit --logout`
  - 設置關機命令為 `gnome-session-quit --power-off`
- 添加Notification Area Old (systray) 圖標（通知區域支持）到 Cairo Dock。

##### GNOME Flashback

詳見：GNOME Flashback#Alternative window manager.

#### MATE 桌面環境

##### 使用 GSettings

使用下面的 GSettings 命令可以將默認的窗口管理器 marco包 改為 Compiz。

    $ gsettings set org.mate.session.required-components windowmanager compiz

##### 使用 mate-session-properties

注意：當使用這種方法時，Marco會首先啟動，然後自動被Compiz替換。

另一種做法是使用mate-session-properties來啟用Compiz。 在終端中輸入下面的命令：

    $ mate-session-properties

單擊「添加」按鈕，並在「命令」文本框中輸入 `compiz --replace &` 命令。 名稱和介紹欄目並不重要，只是用來說明的，不要在意這些細節。 註銷再登錄，Compiz應該就會順利啟動了。

#### Xfce

##### 修改默認 (故障保護Failsafe) 會話

想要設置Xfce的默認會話 (也就是故障保護 Failsafe 會話) ，可以使用 `xfconf-query`:

     xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -t string -s compiz

或者可以編輯下面其中之一：

- 用戶：`~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml`
- 系統：`/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml`

注意：如果 xfce4-session.xml 文件不存在於 `~/.config/xfce4/xfconf/xfce-perchannel-xml` ，你需要去編輯 `/etc/xdg/xfce4/xfconf/xfce-perchannel-xml`中的文件。

將 Xfwm 的啟動命令：

     <property name="Client0_Command" type="array">
       <value type="string" value="xfwm4"/>
     </property>

替換為：

     <property name="Client0_Command" type="array">
       <value type="string" value="compiz"/>
     </property>

為了保護默認會話不被覆蓋，你可能需要使用：

     <property name="general" type="empty">
       ...
       ...
       <property name="SaveOnExit" type="bool" value="false"/>
     </property>

然後移除已經存在的會話：

    $ rm -r ~/.cache/sessions

現在你應該註銷。請確保「保存默認會話」標籤沒有被勾選，否則剛才的編輯不會生效。 再次登錄，Compiz應該就會運行了。當Compiz正常運行之後，你就可以重新鉤上「保存將來的會話」了。

##### Starting Compiz from a restored Xfce session

注意：If you clear your saved sessions then you will need to run through the steps of this method again.

By default, Xfce saves its sessions on logout which means that running applications will be restored on login. Therefore, to ensure that Compiz is autostarted with each session, you merely need to ensure that Compiz is running when you logout. To do so, hit `Alt+F2` to start the Xfce run dialog. Then run the command to start Compiz: `compiz --replace &`. Then you just need to logout. When logging out, ensure that the "Save session for future logins" option in the Xfce logout dialog is ticked. You should find that Compiz is autostarted in all future sessions.

##### Using Xfce application autostart

注意：If this method is used, Xfwm will start first and will then be replaced by Compiz.

In the Xfce main menu navigate to 'Settings' and click on 'Session and Startup.' Click on the 'Application Autostart' tab. Click the add button and in the command section enter the `compiz --replace &` command. The name and comment sections are unimportant and are just there to indicate what the entry does. Log out and log in again and Compiz should start.

提示：When using this method, it is advisable to disable saved sessions otherwise Compiz will be started twice at login which could lead to problems such as the `Alt+F4` keybinding not working. To disable saved sessions, open the 'Session and Startup' menu entry, click on the 'Session' tab and click the 'Clear saved sessions' button. Then, untick the 'Save session for future logins' option in the Xfce logout dialog.

#### LXDE & LXQt

The session files of LXDE and LXQt can be edited to start an alternative window manager (such as Compiz) with the session.

- For LXDE, see the following section: LXDE#Use a different window manager.
- For LXQt, see the following section: LXQt#Use a different window manager.

## Using Compiz as a standalone window manager

### Starting the session with a display manager

A standalone Compiz session can be started from a display manager. For most display manager's (LightDM, LXDM, GDM etc) all that's required is to create a .desktop file in `/usr/share/xsessions` defining the Compiz session. See the article for your display manager to check if this is the case.

Firstly, create the `/usr/share/xsessions` directory if it does not already exist. Then create the .desktop file. A basic example is provided below:

    /usr/share/xsessions/compiz.desktop

    [Desktop Entry]
    Version=1.0
    Name=Compiz
    Comment=Start a standalone Compiz session
    Exec=compiz
    Type=Application

Then just choose 'Compiz' from your sessions list and log in.

注意：Some display managers are stricter than others regarding the syntax of .desktop files. If a Compiz option does not appear in your display manager's session menu you will need to edit your .desktop file to make it compatible. The example above should work in most cases.

#### Autostarting programs when using a display manager

One way in which you could start programs with your Compiz session, when it is started from a display manager, is to use an xprofile file. The xprofile file is similar in syntax to xinitrc - it can contain commands for programs you wish to start with your session. Most display managers will parse commands from an xprofile file by default.

Alternatively, you could use Compiz's 'Session Management' plugin. This plugin will save running programs on exit and restore them when the session is next started. Simply enable the 'Session Management' plugin in CCSM.

### Starting the session with startx

To start Compiz with the `startx` command, add the following line to your `~/.xinitrc` file:

    ~/.xinitrc

    exec compiz

You can also use fusion icon as shown below:

    ~/.xinitrc

    exec fusion-icon

You can autostart additional programs (such as a panel) by adding the relevant command to your `~/.xinitrc` file. Below is an example of a `~/.xinitrc` file which starts Compiz, the tint2 panel and the Cairo dock.

    ~/.xinitrc

    tint2 &
    cairo-dock &
    exec compiz

See the xinitrc article for more details.

### Add a root menu

To add a root menu similar to that in Openbox and other standalone window managers you can install the compiz-boxmenuAUR package. This program is a fork of compiz-deskmenuAUR. Among the changes that the fork introduces are the addition of some extra features such as a window list and a recent documents list.

After installing the compiz-boxmenuAUR package, copy the config files to your home directory as shown below:

    # cp -R /etc/xdg/compiz /home/username/.config
    # chown -R username:group /home/username/.config/compiz

where `username` is your username and `group` is the primary group for your user.

Then, open CCSM, navigate to the 'Commands' plugin and in 'Command line 0' enter the command `compiz-boxmenu`. In the 'Key Bindings' tab, set 'Run command 0' to `Control+Space` (you can use the 'Grab key combination' option to simplify this process.)

Now navigate to the 'Viewport Switcher' plugin and click on the 'Desktop-based Viewport Switching' tab. Change the 'Plugin for initiate action' to `core` and change 'Action name for initiate' to `run_command0_key`.

You should now find that a menu appears when you click `Control+Space`. To launch a graphical menu editor, click on the 'Edit' option or run `compiz-boxmenu-editor` in a terminal. If you would prefer to edit your menu manually, open the following file in your favourite editor: `~/.config/compiz/boxmenu/menu.xml`. For your changes to take effect, you must click the 'Reload' option in your menu.

警告：Whilst `Control+Space` is the default keybinding for `compiz-boxmenu` you can assign the menu to other keybindings or mousebindings as well. Take extreme care if doing so as Compiz bindings will take precedence over keybindings of all other programs. For instance, if you assign `compiz-boxmenu` to `Button3` then you may lose right click functionality in all programs. If the keybinding/mousebinding you are attempting to create has any conflicts, `cssm` will notify you.

### Allow users to shutdown/reboot

An unprivileged user should be able to execute commands such as `systemctl poweroff` and `systemctl reboot`. You could assign a keyboard shortcut to one of these commands using the 'Commands' plugin in CCSM. Alternatively, you could create a launcher for one of these commands in compiz-boxmenuAUR - see above. For more detailed information on shutting down see the following article: Allow users to shutdown.

### Utilities

#### Panels & docks

There are a number of panels and docks available in Arch however only a few are compatible with Compiz's viewports. They are listed below:

- xfce4-panel包
- mate-panel包
- perlpanelAUR[損壞的連結：package not found]
- gnome-panel包
- cairo-dock包

注意：Other panels and docks can be run with Compiz however their desktop pagers will show only one virtual desktop and all window buttons will be shown in all viewports regardless of which viewport the window happens to be in.

#### Run dialog

- mate-panel包 provides a run dialog. To enable it, see the following section: Compiz#MATE Panel[損壞的連結：無效的章節].
- gnome-panel包 provides a run dialog. To enable it, see the following section: Compiz#GNOME Panel[損壞的連結：無效的章節].
- lxpanel包 provides a run dialog. To enable it, see the following section: Compiz#LXDE Panel[損壞的連結：無效的章節].

注意：The panels mentioned above must be running in order to use their respective run dialogs.

Alternatively you could install one of the following:

- xfce4-appfinder包 - use the following command to launch a run dialog: `xfce4-appfinder --collapsed`
- bbrunAUR - use the following command to launch a run dialog: `bbrun -w`
- gmrun包 - use the following command to launch a run dialog: `gmrun`
- fbrunAUR[損壞的連結：package not found] - use the following command to launch a run dialog: `fbrun`

In each case, simply map the command to `Alt+F2` (or a key combination of your choice) via the 'Commands' plugin in CCSM.

## 小技巧大放送

### 還原原生窗口管理器

你可以用下面的命令把Compiz改回你桌面環境原生的窗口管理器：

    wm_name --replace

使用 `kwin`、 `metacity` 或 `xfwm4` 替換掉 `wm_name`.

### 啟用 Alt+F2 運行對話框

#### GNOME Panel

在CCSM中啟用 'Gnome Compatibility' 插件。

#### MATE Panel

有兩種方法在Compiz中啟動 MATE Panel 中的運行對話框，你自己選吧：

- 在CCSM中啟用 'Gnome Compatibility' 插件
- 使用「命令」（Commands）插件，設置 `Alt+F2` 快捷鍵的綁定如下：

    mate-panel --run-dialog

#### LXDE Panel

使用「命令」（Commands）插件，設置 `Alt+F2` 快捷鍵的綁定如下：

    lxpanelctl run

#### Xfce 程序查看器（Appfinder）

當在Xfce會話中使用Compiz時，運行對話框（由xfce4-appfinder包提供）無需任何干預應該管用。

但是如果你是在Compiz獨立會話中使用程序查看器的話，請查看這一章節：Compiz#Run dialog[損壞的連結：無效的章節]。

#### 其他的運行對話框功能

請查看這一章節：Compiz#Run dialog[損壞的連結：無效的章節]。

## 疑難排解

### Missing GLX_EXT_texture_from_pixmaps

#### On ATI cards (first solution)

You may run into the following error when trying to run Compiz on an ATI card:

    Missing GLX_EXT_texture_from_pixmap

This is because Compiz's binary was compiled against Mesa's OpenGL library rather than ATI's OpenGL library.

Firstly, copy the library into a directory to keep it because ATI's drivers will over write it:

    $ install -Dm644 /usr/lib/libGL.so.1.2 /usr/lib/mesa/libGL.so.1.2

Then you can reinstall your fglrx drivers. Now start Compiz as shown below:

    LD_PRELOAD=/usr/lib/mesa/libGL.so.1.2 compiz --replace &

#### On ATI cards (second solution)

Another possible problem with 'GLX_EXT_texture_from_pixmap' on ATI cards is that the card can only render it indirectly. If so, you have to pass the option to your libgl as shown below:

    LIBGL_ALWAYS_INDIRECT=1 compiz --replace &

(Workaround tested on the following card : ATI Technologies Inc Radeon R250 [Mobility FireGL 9000] (rev 02))

#### On Intel chips

Firstly, check that you are using the intel driver as opposed to i810. Then, run the following command to run Compiz (This must be used every time).

    LIBGL_ALWAYS_INDIRECT=true compiz --replace --sm-disable &

### Compiz starts without window borders with NVIDIA binary drivers

Firstly, ensure that your window decorator settings are configured correctly - see the following: Compiz#Starting the window decorator[損壞的連結：無效的章節]. If window borders still do not start try adding Option "AddARGBGLXVisuals" "True" and Option "DisableGLXRootClipping" "True" to your "Screen" section in `/etc/X11/xorg.conf.d/20-nvidia.conf`. If window borders still do not load and you have used other Options elsewhere in `/etc/X11/xorg.conf.d/` try commenting them out and using only the aformentioned ARGBGLXVisuals and GLXRootClipping Options.

### Blank screen on resume from suspend-to-ram using the NVIDIA binary drivers

If you receive a blank screen with a responsive cursor upon resume, try disabling sync to vblank. To do so, open CCSM, navigate to the 'OpenGL' plugin and untick the 'Sync to VBlank' option.

### Poor performance from capable graphics cards

NVIDIA and Intel chips: If everything is configured correctly but you still have poor performance with some effects, try disabling CCSM > General Options > Display Settings > Detect Refresh Rate and instead choose a value manually.

NVIDIA chips only: The inadequate refresh rate with 'Detect Refresh Rate' may be due to an option called 'DynamicTwinView' being enabled by default which plays a factor in accurately reporting the maximum refresh rate that your card and display support. You can disable 'DynamicTwinView' by adding the following line to the "Device" or "Screen" section of your `/etc/X11/xorg.conf.d/20-nvidia.conf`, and then restarting your computer:

    Option "DynamicTwinView" "False"

### Screen flicks with NVIDIA card

To fix this behaviour create the file below:

    /etc/modprobe.d/nvidia.conf

    options nvidia NVreg_RegistryDwords="PerfLevelSrc=0x2222"

### Compiz effects not working (GConf backend)

If you have installed the gtk-window-decorator, check if the GConf schema was correctly installed:

    $ gconftool-2 -R /apps/compiz/plugins | grep plugins

Make sure that all plugins are listed. If they are not, try to install the Compiz schema manually (do not run this command as root):

    $ gconftool-2 --install-schema-file=/usr/share/gconf/schemas/compiz-decorator-gtk.schemas

### Fusion Icon fails to start

If you get an output like this from the command line:

    $ fusion-icon

    * Detected Session: gnome
    * Searching for installed applications...
    Traceback (most recent call last):
      File "/usr/bin/fusion-icon", line 57, in <module>
        from FusionIcon.interface import choose_interface
      File "/usr/lib/python2.5/site-packages/FusionIcon/interface.py", line 23, in <module>
        import start
      File "/usr/lib/python2.5/site-packages/FusionIcon/start.py", line 36, in <module>
        config.check()
      File "/usr/lib/python2.5/site-packages/FusionIcon/util.py", line 362, in check
        os.makedirs(self.config_folder)
      File "/usr/lib/python2.5/os.py", line 172, in makedirs
        mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/home/andy/.config/compiz'

the problem is with the permission on `~/.config/compiz/`. To fix it, use:

    # chown -R username /home/username/.config/compiz/

### Alt+F4 keybinding not working (Xfce)

See the following section: Compiz#Using Xfce application autostart[損壞的連結：無效的章節].

### Emerald refuses to start (crashes with a segfault)

You may find that Emerald fails to start with your Compiz session and attempting to start it from a terminal gives you the following output (or something similar):

    Segmentation fault (core dumped)

In this case, the solution is to reset the Emerald theme settings:

    $ rm -rf ~/.emerald/theme

Emerald should now start successfully.

### No system bell when Compiz is running

You may find that the system bell (such as the drip sound played when pressing backspace at the beginning of a line in GNOME or MATE Terminal) will not sound if Compiz is running. See the following upstream bug report.

For PulseAudio users the following workaround is available:

Append the following lines

    load-sample-lazy bell /usr/share/sounds/freedesktop/stereo/bell.oga
    load-module module-x11-bell sample=bell

to your `/etc/pulse/default.pa` file and then restart Pulseaudio.

### Compiz crashes when enabling the Gnome Compatibility plugin (GSettings backend)

If you are using the GSettings backend, you may find that Compiz crashes if you try to enable the 'Gnome Compatibility' plugin. In order to enable this plugin whilst using the GSettings backend you need to open CCSM and navigate to 'Preferences.' Under the header 'Integration' untick the box labelled 'Enable integration into the desktop environment.' After unticking this option, you should find it possible to enable the 'Gnome Compatibility' plugin.

## Known issues

### Xfce panel window buttons are not refreshed when a window changes viewport

You may find that if you right click on a window title and choose an option such as 'Move to Workspace Right' then the window will move but the window button will still be visible in the viewport the window moved from until you switch viewports. See the following upstream bug report.

### Compiz crashes when enabling the D-Bus plugin

The D-Bus plugin will cause Compiz to crash if enabled in conjunction with certain other plugins such as the Cube plugin. See the following upstream bug report.

## See also

- Compiz in Launchpad
- Compiz Home, including wiki and forum (website and wiki are unmaintained)
- Troubleshooting - Compiz Wiki, (wiki is unmaintained)

分類：​

- 使用「模板:過時」標記的頁面或章節
- 小提升
- 堆疊式窗口管理器
- 包含損壞的軟體包連結的頁面

隱藏分類：​

- 使用「模板:糟糕的翻譯」標記的頁面或章節
- 包含損壞章節連結的頁面

Compiz
新增話題