Compiz - ArchWiki

# Compiz

Related articles

- Compiz Configuration
- Window manager
- Desktop environment
- Xfce
- MATE

According to Wikipedia:

  Compiz is a compositing window manager for the X Window System, using 3D graphics hardware to create fast compositing desktop effects for window management. Effects, such as a minimization animation or a cube workspace, are implemented as loadable plugins.

## Installation

As of May 2013, Compiz is no longer available in the official repositories. Packages for installing both the 0.9 and 0.8 series are available in the AUR. The two series are not parallel installable.

Note: With the exception of the compiz-coreAUR package, all of the packages listed as required provide the GTK Window Decorator by default. See #Window Decoration.

### Installing the 0.9 series

Note: From Compiz 0.9.8 onwards, all Compiz components are developed and distributed as a single project. This means that a single package can provide all of the Compiz components.

Required:

- Compiz — OpenGL compositing window manager with CCSM, Plugins and GTK Window Decorator.

  https://launchpad.net/compiz || compizAUR, compiz-bzrAUR

Optional:

- Emerald — A standalone window decorator for Compiz.

  http://www.compiz.org/ || emerald0.9AUR

- Emerald Themes — Extra themes for the Emerald window decorator.

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

- Fusion Icon — A tray applet for starting Compiz and switching window decorators on the fly.

  https://github.com/kozec/fusion-icon-gtk3 || fusion-icon0.9AUR

### Installing the 0.8 series

Required:

- Compiz Core — OpenGL compositing window manager.

  http://www.northfield.ws/projects/compiz/ || compiz-coreAUR, compiz-gtk-standaloneAUR, compiz-core-mateAUR

Highly recommended:

- CompizConfig Settings Manager — Graphical settings manager for Compiz.

  http://www.northfield.ws/projects/compiz/ || ccsmAUR

- Compiz Fusion Plugins Main — Main plugins collection for Compiz.

  http://www.northfield.ws/projects/compiz/ || compiz-fusion-plugins-mainAUR

- Compiz Fusion Plugins Extra — Extra plugins collection for Compiz.

  http://www.northfield.ws/projects/compiz/ || compiz-fusion-plugins-extraAUR

Optional:

- Compiz Fusion Plugins Unsupported — Unsupported Compiz plugins.

  http://www.northfield.ws/projects/compiz/ || compiz-fusion-plugins-unsupportedAUR

- Emerald — A standalone window decorator for Compiz.

  http://www.northfield.ws/projects/compiz/ || emeraldAUR

- Emerald Themes — Extra themes for the Emerald window decorator.

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

- Fusion Icon — A tray applet for starting Compiz and switching window decorators on the fly.

  http://www.compiz.org/ || fusion-iconAUR

## Starting Compiz

### Enabling important plugins

Tip: Depending on which package you installed Compiz from, some of these plugins may already be activated.

Before starting Compiz, you should activate some plugins to provide basic window manager behaviour or else you will have no ability to drag, scale or close any windows. Important plugins are listed below:

- Window Decoration - provides window borders (see #Window Decoration)
- Move Window
- Resize Window
- Place Windows - configure window placement options
- Application Switcher - provides an Alt+Tab switcher (there are numerous alternative application switcher plugins e.g. 'Shift Switcher,' 'Static Application Switcher' etc. Not all of them use the Alt+Tab keybinding).
- OpenGL - (only visible in CCSM 0.9).
- Composite - (only visible in CCSM 0.9).

To be able to switch to different viewports you will need to enable one of the following:

- Desktop Cube & Rotate Cube - provides the spinning cube with each side being a different viewport
- Desktop Wall - viewports are arranged next to each other (animation is similar to the workspace switching animation in Cinnamon and GNOME Shell.)
- Expo - creates a view of all viewports and windows when the mouse is moved into the top left corner (this plugin can be used on its own or in conjunction with either of the two previous plugins)

#### Window decoration

Tip: For information on selecting and managing themes, see: Compiz Configuration#Window decoration themes.
Note: The `--replace` switch is needed when changing the default decorator as Compiz will always attempt to start the hardcoded default decorator first.

The window decorator is the program which provides windows with borders. Unlike window managers such as Kwin or Xfwm which provide just one decorator, users of Compiz have a choice of three: GTK Window Decorator, KDE Window Decorator and Emerald. The GTK Window Decorator and the KDE Window Decorator are included in the Compiz source and can be optionally compiled whilst building Compiz. Emerald, on the other hand, is a separate, standalone decorator.

To set the default decorator for Compiz, start CCSM - you can do this by running ccsm. Then navigate to the 'Effects' section and ensure that the 'Window Decoration' plugin is ticked. Finally, click on the 'Window Decoration' button and in the 'Command' field enter the relevant command for your decorator:

- `emerald --replace`

- `gtk-window-decorator --replace`

- `kde4-window-decorator --replace`

### Compiz startup

Note: It was once necessary to use the `ccp` switch with the `compiz --replace` command in order to load Compiz plugins. This bug was fixed downstream in Compiz packaging and then fixed upstream with revision 3951.

You can start Compiz using the following command:

    $ compiz --replace

See `compiz --help` for more options.

#### Fusion Icon

Tip: Fusion Icon can be set as the default window manager for a desktop environment - see #Autostarting Compiz/Fusion Icon in a desktop environment.

To start Compiz using Fusion Icon, execute the command below:

    $ fusion-icon

To ensure that fusion-icon then starts Compiz, right click on the icon in the panel and go to 'select window manager'. Choose 'Compiz' if it isn't selected already.

### Autostarting Compiz/Fusion Icon in a desktop environment

Refer to your desktop environment's article for instructions on replacing the default window manager. Links are provided below.

GNOME

Compiz cannot be used with GNOME Shell however alternative GNOME sessions which use Compiz are available.

- Cairo dock & Compiz GNOME Session - install the gnome-session-compizAUR package. To use the session, select the GNOME/Compiz entry from your display manager menu.

- GNOME Flashback provides a Compiz session.

Cinnamon

Compiz cannot be used with Cinnamon.

Other desktop environments

- KDE - See KDE#Using an alternative window manager in KDE.

- MATE - See MATE#Use a different window manager with MATE

- Xfce - See Xfce#Default window manager.

- LXDE - See LXDE#Replace Openbox.

- LXQt - See LXQt#Replace the default 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. See Desktop entries for information on creating a `.desktop` file.

#### 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.

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

A Compiz session can be started with startx. Define either compiz or fusion-icon in your `.xinitrc` file. 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 install compiz-boxmenuAUR. This program is a fork of compiz-deskmenuAUR.

Then 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` or another key/mouse button combination of choice. Take care not to use a combination that is already used for other functionality.

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.

### 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 and 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
- perlpanel
- gnome-panelAUR
- cairo-dock

Note: 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. See #MATE Panel.
- gnome-panelAUR provides a run dialog. See #GNOME Panel.
- lxpanel provides a run dialog. See #LXDE Panel.

Note: 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`
- bbrun - use the following command to launch a run dialog: `bbrun -w`
- gmrun - use the following command to launch a run dialog: `gmrun`
- fbrunAUR - 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.

## Tips and tricks

### Restoring the native window manager

You can switch back to your desktop environment's default window manager with the following command:

    wm_name --replace

with `kwin`, `metacity` or `xfwm4` instead of `wm_name`.

### Enabling the Alt+F2 run dialog

#### GNOME Panel

Enable the 'Gnome Compatibility' plugin in CCSM.

#### MATE Panel

There are two ways to enable MATE Panel's run dialog in Compiz. You can either:

- Enable the 'MATE Compatibility' plugin in CCSM (use the 'Gnome Compatibility' plugin for older Compiz versions which lack the MATE plugin).
- Map the command below to the `Alt+F2` key combination using the 'Commands' plugin in CCSM.

    mate-panel --run-dialog

#### LXDE Panel

Map the command below to the `Alt+F2` key combination using the 'Commands' plugin in CCSM.

    lxpanelctl run

#### Xfce Appfinder

When Compiz is used in an Xfce session, the run dialog (provided by xfce4-appfinder) should work without intervention. If you are using Xfce Appfinder in a standalone Compiz session, see #Run dialog.

#### Other run dialogs

See #Run dialog.

## Troubleshooting

### 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're using the intel driver as opposed to i810. Then, use the following command to start Compiz (this command 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 #Window Decoration. 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 with 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"

### Video tearing

If you experience video tearing when using Compiz, try enabling the 'Workarounds' plugin in CCSM. Once enabled, ensure that the following options are enabled in Workarounds: Force complete redraw on initial damage, Force full screen redraws (buffer swap) on repaint.

If you are using Intel graphics and the workaround above does not fix the video tearing, see Intel graphics#Tear-free video.

Also see, #Poor performance from capable graphics cards.

### 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)

If you are experiencing this problem, it is likely because Compiz is getting started twice at login - see Xfce#Default window manager.

### Emerald crashes when selecting a theme

You may find that Emerald crashes when selecting certain themes (especially themes that use the legacy engine). If this occurs, select another theme in Emerald Theme Manager and then run the command `emerald --replace`.

### 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.

### Windows lose focus when unminimised

You may find that certain windows (such as a Chromium window) will lose focus when unminimised. See the following upstream bug report. One possible solution is to enable the 'Keep previews of minimized windows' option, located within the 'Workarounds' plugin.

Note: If you use the Chrome/Chromium browser and you enable this workaround, you will need to ensure that the 'Use system title bar and borders' option within Chrome is enabled. If Chrome's own titlebar is used with the 'Keep previews of minimized windows' Compiz workaround then when Chrome is minimized, the desktop beneath will become unresponsive

### Popout windows are offset when Compiz is running

You may find that popout windows for panels which are placed at the bottom of the screen are offset by a few pixels so that the window appears to float above the panel. This problem is known to affect Xfce and KDE and may affect other desktops as well. Listed below are a number of workarounds that might fix some cases.

- Place the panel at the top of screen instead of the bottom. (This should work in most cases.)
- Disable the 'Place Windows' plugin. (Works for the Xfce Whisker Menu plugin.)
- Use fixed window placement to determine the window's position. This can be set from the 'Place Windows' plugin. For instance, for the Whisker Menu, specify that the window with the title 'Whisker Menu' (no quotation marks) should appear at (-1, -1).

For more information, see the following upstream bug report.

### Alt-Tab switcher has no background (Emerald)

You may find that the Alt-Tab switcher (provided by the staticswitcher or switcher plugins) has a completely transparent background when using Emerald as well. This can make it hard to differentiate window thumbnails from the desktop background behind them. Using GTK Window Decorator instead of Emerald should fix this issue. Alternatively, consider using a different Alt-Tab switcher such as the shift switcher.

## Known issues

### Plugins in Compiz 0.8 are not present in Compiz 0.9

Many plugins that were popular in Compiz 0.8 (such as the Animations Add-On plugin) were disabled in Compiz versions 0.9.8 and above in order to complete OpenGL ES support. Disabled plugins that receive patches for this issue may well be re-enabled in future releases. For more information, see the Compiz 0.9.8 release notes.

Likewise, Compiz Plugins Unsupported (a package which includes plugins such as 'Atlantis') is unavailable in recent versions of Compiz 0.9. It has not been developed since Compiz 0.9.5 and no longer builds successfully.

### 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.

### Workspace pager does not show all workspaces/window buttons present in all workspaces

See #Panels and docks.

## See also

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

Categories:

- Eye candy
- Stacking WMs