*This method will mean that metacity will start first and will then be replaced by Compiz.

*This method will mean that metacity will start first and will then be replaced by Compiz.

*You can also use this method to start fusion-icon.}}

*You can also use this method to start fusion-icon.}}

−

{{warning|Ensure that this entry is disabled when starting GNOME Shell as it will likely cause the shell to crash.}}

+

{{warning|Ensure that this entry is disabled if you are starting GNOME Shell as {{ic|gnome-session-properties}} is share between both the Flashback and Shell sessions and this entry will likely cause GNOME Shell to crash.}}

==== MATE ====

==== MATE ====

Revision as of 13:28, 22 January 2014

Compiz is a compositing window manager. It can replace the native window managers in desktop environments such as MATE and KDE. The first version of Compiz was released in 2006. In 2007 Compiz was split into two projects: 'compiz-core' (the window manager) and 'compiz-fusion' (the decorator and plugins). In 2009 the two projects merged into a single unified project and the 'fusion' name was dropped. Despite this, Compiz is often still referred to as 'compiz-core' and 'compiz-fusion' in package names and in older documentation. There are currently two developement branches of Compiz: the older 0.8x branch, which was often seen used in GNOME 2, and the 0.9x branch which is primarily used in the Unity desktop shell. The 0.8x branch is written in C whilst the 0.9x branch is written in C++.

Installation

Installing the 0.9x branch

The 0.9x branch can be installed from the compiz-bzrAUR package. This package provides the decorator, plugins and settings panel so no additional packages are required.

Tip: The 0.9x branch is usable with other desktop environments such as MATE and Xfce. However due to significant changes between the two branches some popular utilities such as the Emerald decorator and fusion-icon may not be compatible with the 0.9x branch.

Installing the 0.8x branch

The window manager itself can be installed from the compiz-coreAUR package.

fusion-iconAUR - a tray applet that starts compiz and can load different window managers and decorators during a session

compiz-mateAUR - a plugin for greater integration with the MATE desktop

compiz-xfceAUR - a plugin for greater integration with the Xfce desktop

Note:

The compiz-mate and compiz-xfce packages are not required for Compiz to function in either desktop.

The 0.8x branch has not been updated for some time and is unlikely to be updated in the future as all work is concentrated on the 0.9x branch.

Installing a window decorator

Unlike window managers such as mutter, Kwin or Xfwm, Compiz does not provide a window decorator so you will need to install one yourself. There are three main decorators used with Compiz:

Emerald - This decorator can be installed from the emeraldAUR package in the AUR. It has a number of themes available and supports various effects. You may also wish to install the emerald-themesAUR package which contains a number of extra themes for emerald.

gtk-window-decorator - Also known as compiz-decorator-gtk, this decorator can be installed from the compiz-decorator-gtk-no-gnomeAUR package in the AUR. For those installing the 0.9x branch, gtk-window-decorator is already included in the compiz-bzrAUR package.

kde-window-decorator - This decorator is provided by the kdebase-workspace package. This package will pull in a number of KDE dependencies and therefore may not be the best solution in non KDE environments.

Starting the window decorator

Whist the appearance of the windows and their contents is a function of GTK+ and Qt, the frames around the windows are controlled by the Window Decoration plugin. To use it make sure you have a window decorator installed - see above. In a terminal enter ccsm. In the panel, ensure that the 'Window Decoration' plugin is enabled in CCSM's 'Effects' tab. Click on the 'Window Decoration' button and in the 'Command' field enter the relevant command for your decorator - see below:

To set emerald as your default window decorator use:

$ emerald --replace

The emerald-theme-manager command will open a GUI for managing Emerald themes.

To set the kde-window-decorator as your default window decorator use:

$ kde4-window-decorator --replace

To set the gtk-window-decorator as your default window decorator use:

$ gtk-window-decorator --replace

Note:

You must activate important plugins to provide basic window manager behaviour or else you will have no ability to drag, scale or close any windows as soon as Compiz is activated. Among those plugins are 'Window Decoration' under 'Effects' and 'Move Window' & 'Resize Window' under 'Window Management.' These can be enabled with ccsm.

If you are using fusion-icon there is no need to use a command to start a window decorator as fusion-icon will start the decorator by itself.

Starting Compiz

With fusion-icon

You can launch fusion-icon with the following command:

$ fusion-icon

To enable fusion-icon on startup you need to autostart it. Refer to the Autostarting article and your desktop environment's article for further instruction.

Right click on the icon in the panel and go to 'select window manager'. Choose "Compiz" if it isn't selected already.

Note: Using fusion-icon means that the native window manager will be loaded first which will then be replaced by Compiz.

Without fusion-icon

You can start Compiz using the following command:

$ compiz --replace ccp &

See below for desktop environment specific instructions on how to start Compiz automatically without fusion-icon.

A quick overview over common Compiz command-line options:

--indirect-rendering: use indirect-rendering (AIGLX)

--loose-binding: can help performance issues (NVIDIA?)

--replace: replace current window-manager

--keep-window-hints: keep the gnome window manager gconf-settings for available viewports

--sm-disable: disable session-management

ccp: the "ccp" command loads the last configured settings from CCSM (CompizConfig Settings Manager) otherwise Compiz will load with no settings and you won't be able to do anything with your windows like dragging, maximizing/minimizing, or moving.

Starting Compiz automatically without fusion-icon

Methods which involve starting the native window manager and then replacing it with Compiz have been indicated as such.

Note: If compiz.desktop already exists, you may have to add --replace and/or ccp to the Exec variable. Without --replace, Compiz won't load since it will detect another window manager already loaded. Without ccp, Compiz will not load any of the settings and plugins that you have enabled through CompizConfig Settings Manager (ccsm) and you won't be able to manipulate any of your windows.

Export KDEWM

As root you must create a short script. This will allow you to load Compiz with extra switches as doing it directly via $ export KDEWM="compiz --replace ccp --sm-disable" may not work.

Create the file with the necessary text by using the command below:

$ echo "compiz --replace ccp --sm-disable &" > /usr/bin/compiz-fusion

Ensure that /usr/bin/compiz-fusion has executable (+x) permissions.

$ chmod +x /usr/bin/compiz-fusion

Choose one of the following:

1) For your user only:

~/.kde4/env/compiz.sh

KDEWM="compiz-fusion"

2) System-wide:

/etc/kde/env/compiz.sh

KDEWM="compiz-fusion"

Note:

If the above method does not work, an alternate approach is to include the line:

$ export KDEWM="compiz-fusion"

in your user's ~/.bashrc file.

If you optionally use the /usr/local/bin directory it may not work. In that case you should export the script including the whole path:

$ export KDEWM="/usr/local/bin/compiz-fusion"

GNOME

GNOME Shell

GNOME Shell is set up as a plugin of the mutter window manager. This means that it is impossible to use GNOME Shell with Compiz or any other window manager.

GNOME Flashback

Click on the add button and in the command section enter the compiz --replace ccp & 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.

Note:

This method will mean that metacity will start first and will then be replaced by Compiz.

You can also use this method to start fusion-icon.

Warning: Ensure that this entry is disabled if you are starting GNOME Shell as gnome-session-properties is share between both the Flashback and Shell sessions and this entry will likely cause GNOME Shell to crash.

MATE

Using gsettings

Use the following gsettings command to change the default window manager from marco to Compiz.

Using mate-session-properties

Compiz can replace the marco window manager in the MATE. In a terminal enter the command:

$ mate-session-properties

Click on the add button and in the command section enter the compiz --replace ccp & 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 the Compiz should start.

Note:

The first method will mean that only Compiz starts with the session. The second method means that marco will start first and will then be replaced by Compiz.

You can also use the second method to start fusion-icon.

Xfce

Modifying the failsafe session

To configure the default/failsafe session of Xfce, edit the ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml or (to make the change for all Xfce users) /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml:

Tip: When logging out after this edit ensure that the 'Save session for future logins' option in the logout dialogue is unticked. Once Compiz has started you can then tick the option again.

Using Xfce Application Autostart

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 ccp & 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 the Compiz should start.

Note:

The first method will mean that only Compiz starts with the session. The second method means that xfwm4 will start first and will then be replaced by Compiz.

You can also use the second method to start fusion-icon.

Using Compiz as a standalone window manager

To start Compix configure .xinitrc to launch Compiz as:

~/.xinitrc

exec compiz ccp

You can also use fusion icon as shown below:

~/.xinitrc

exec fusion-icon

However chances are you will need additional apps (e.g a panel) for optimal usability:

~/.xinitrc

tint2 &
cairo-dock &
exec fusion-icon

Note: Add a terminal-emulator to this autostart list while starting for the first time to help configure Compiz.

Add a root menu

To add a root menu similar to that in Openbox, Fluxbox, Blackbox etc. you must install the package compiz-deskmenuAUR.
Upon a restart of Compiz Fusion, you should be able to middle click on your desktop to launch the menu.

If it does not automatically work, enter the CompizConfig Settings Manager, and in Commands tab, within the General Settings menu, ensure that there is a command to launch Compiz-Deskmenu, and the appropriate key binding is set to Ctrl+Space.

If it still does not work, enter the Viewport Switcher menu, and change "Plugin for initiate action" to 'commands', and "Action name for initiate" to run_command0_key.

Note: Compiz basic plugins are not enabled by default. You should enable "Move Window", "Resize Window", and "Window decoration" plugins in settings manager from Fusion Icon to have a usable window manager.

Compiz starts, but gtk-window-decorator does not

It is a configuration problem for gconf and gconfd. You may try removing ~/.gconf/. This will erase your Compiz settings, so be sure to reconfigure.
Finally as user:

You may also try adding Option "AddARGBGLXVisuals" "True" and Option "DisableGLXRootClipping" "True" to your "Screen" section, if you are using the NVIDIA binary driver. If you used any other Options elsewhere in /etc/X11/xorg.conf.d/ to get Compiz working and still have no luck, try commenting them out and using only the aformentioned ARGBGLXVisuals and GLXRootClipping Options.

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

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

Choppy animations, even though everything configured correctly

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

Alternatively, if your chip is NVIDIA and you are experiencing an inadequate refresh rate with "Detect Refresh Rate" enabled in Compiz, it's likely 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/*.conf, and then restarting your computer:

Option "DynamicTwinView" "False"

Doing so will allow XrandR to accurately report the refresh rate to anything that detects it, including Compiz. You should be able to leave "Detect Refresh Rate" enabled and get excellent performance. Once again, this only applies to NVIDIA chips.