Difference between revisions of "Compiz"
m (→Modifying the failsafe session: minor change in last instruction) |
m (→Using Xfce application autostart: minor structural change) |
||
Line 305: | Line 305: | ||
===== Using Xfce application autostart ===== | ===== Using Xfce application autostart ===== | ||
+ | |||
+ | {{Note|If this method is used, xfwm4 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 {{ic|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. | 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 {{ic|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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Using Compiz as a standalone window manager == | == Using Compiz as a standalone window manager == |
Revision as of 09:34, 6 March 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 September 2006 several changes proposed for Compiz were rejected by the Compiz team. This led to the formation of Beryl - a fork of Compiz. In 2007 the Compiz and Beryl communities merged and 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. There are currently two branches of Compiz: the older 0.8.x branch which is written in C and the newer 0.9.x branch which is written in C++.
Contents
- 1 Installation
- 2 Starting the window decorator
- 3 Starting Compiz
- 4 Using Compiz as a standalone window manager
- 5 Tips and tricks
- 6 Troubleshooting
- 6.1 All windows start maximised
- 6.2 No Alt-F2 run dialog in MATE
- 6.3 Missing GLX_EXT_texture_from_pixmaps
- 6.4 Compiz effects not working (gconf backend)
- 6.5 Compiz starts without window borders with NVIDIA binary drivers
- 6.6 Blank screen on resume from suspend-to-ram using the NVIDIA binary drivers
- 6.7 fusion-icon doesn't start
- 6.8 Poor performance from capable graphics cards
- 6.9 Screen flicks with NVIDIA card
- 7 See also
Installation
As of May 2013 Compiz is no longer available in the official repositories. There are a number of packages in the AUR which can provide a full Compiz experience. The packages listed in this section are known to provide a working Compiz configuration. Other Compiz packages are also available.
Installing the 0.9.x branch
Install one of the following two packages:
- compiz-devAUR - This package provides the latest stable release of the 0.9.x branch. It includes the window manager, decorator, settings panel and plugins.
- compiz-bzrAUR - This package provides the latest development version of the 0.9.x branch. It includes the window manager, decorator, settings panel and plugins.
Installing the 0.8.x branch
Compiz can be installed from one of the following four packages:
- compiz-coreAUR - This package contains the Compiz window manager.
- compiz-pureAUR - This package contains the Compiz window manager and the compiz-decorator-gtk window decorator.
- compizAUR - This package contains the Compiz window manager and both the compiz-decorator-gtk and kde-window-decorator window decorators.
- compiz-xfceAUR - This package includes the Compiz window manager, compiz-decorator-gtk, settings panel and plugins. It is optimised for the Xfce desktop. The packages below are not required if you install this package.
The following packages are not essential but are highly recommended:
- ccsmAUR - a settings panel for compiz
- compizconfig-pythonAUR - Compizconfig bindings for python (required by ccsm)
- libcompizconfigAUR - Compiz configuration system library (required by compizconfig-python)
- compiz-fusion-plugins-mainAUR - important plugins for Compiz
- compiz-fusion-plugins-extraAUR - extra plugins for Compiz
- compiz-bcopAUR - Compiz option code generator (required by all compiz-fusion-plugins)
The following packages are optional:
- compiz-fusion-plugins-unsupportedAUR - unsupported plugins for Compiz
- 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
- The compiz-mate and compiz-xfce packages are not required for Compiz to function in either desktop.
- The 0.8.x 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.9.x 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. Depending on which packages you used to install Compiz you may have a window decorator included already. 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. If you are installing the 0.9.x branch from the compiz-bzrAUR package then install the emerald-gitAUR package to use Emerald with Compiz 0.9.x.
- compiz-decorator-gtk - This decorator is included in the compiz-pureAUR, compizAUR and compiz-xfceAUR packages. If you are installing the compiz-coreAUR package you can install compiz-decorator-gtk seperately from the compiz-decorator-gtk-no-gnomeAUR package. For those installing the 0.9.x branch, compiz-decorator-gtk is included in the compiz-bzrAUR and compiz-devAUR packages. This decorator can use Metacity or Cairo themes.
- kde-window-decorator - The compizAUR package contains both the compiz-decorator-gtk and kde-window-decorator window decorators. The kde-window-decorator requires the kdebase-workspace package which pulls in a number of KDE dependencies. Therefore it may not be the best solution in non KDE environments. If you are installing the 0.9.x branch and wish to use the kde-window-decorator modify the PKGBUILD of the package you are using and set
KDEWINDOWDECORATOR
to"on"
. This decorator uses the current Kwin theme.
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
Emerald themes can be selected and installed using the emerald-theme-manager
program.
- To set the
kde-window-decorator
as your default window decorator use:
$ kde4-window-decorator --replace
Kwin themes can be selected and installed using the KDE systemsettings
panel.
- To set
compiz-decorator-gtk
as your default window decorator use:
$ gtk-window-decorator --replace
Many Metacity themes are available for download here. Once downloaded, they should be unpacked into the user's ~/.themes
directory (create it if it doesn't exist.) To select the theme open dconf-editor
and expand org --> gnome --> desktop --> wm and click on 'preferences.' Change the value of the key 'Theme' to the name of the theme you wish to use.
- 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 set the command in CCSM as fusion-icon will do this automatically.
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.
- Using fusion-icon means that the native window manager will be loaded first which will then be replaced by Compiz.
- It is uncertain whether fusion-icon is compatible with the 0.9.x branch.
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.
KDE4
Use System Settings
Go to: System Settings > Default Applications > Window Manager > Use a different window manager
If you need to run Compiz with custom options select "Compiz custom", then create the following script:
/usr/local/bin/compiz-kde-launcher
#!/bin/bash LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & wait
Then make it executable:
$ chmod +x /usr/local/bin/compiz-kde-launcher
Autostart link
compiz.desktop
if you intend to install compiz-decorator-gtk as it will create a file conflict.Append a desktop entry in the KDE Autostart directory. If it doesn't exist already (it should), create it:
~/.kde4/Autostart/compiz.desktop
[Desktop Entry] Type=Application Encoding=UTF-8 Name=Compiz Exec=/usr/bin/compiz ccp --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
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"
- 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.
Alternate Session for GNOME (Cairo dock and Compiz)
The gnome-session-compizAUR package can be used to add an additional session in a display manager. Simply select the 'gnome-session-compiz' option in your display manager.
Ensure that Compiz and Cairo Dock (Taskbar/Panel) have been configured correctly.
In CCSM ensure that a window decorator is selected and the necessary plugins for window management have been enabled. See here.
See below for recommended Cairo dock configuration:
- Add Application Menu icon to Cairo Dock and remember its key-bindings.
- Remap Application Menu key-bindings to
ALT+F1
andALT+F2
, for convenience. - Add Clock, WiFi, NetSpeed icons to the dock as applicable.
- Add Log-out icon:
- Set the command for logout to
gnome-session-quit --logout
- Set the command for shutdown to
gnome-session-quit --power-off
- Set the command for logout to
- Add the Notification Area Old (systray) icon to Cairo Dock.
GNOME Flashback
Compiz can replace the metacity window manager in the GNOME Flashback session. In a terminal enter the command:
$ gnome-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 Compiz should start.
MATE
Using gsettings
Use the following gsettings command to change the default window manager from marco to Compiz.
$ gsettings set org.mate.session.required-components windowmanager compiz
Using mate-session-properties
Another approach is to start Compiz using mate-session-properties. 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 Compiz should start.
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
:
Replace the xfwm startup command,
<property name="Client0_Command" type="array"> <value type="string" value="xfwm4"/> </property>
with the following:
<property name="Client0_Command" type="array"> <value type="string" value="compiz"/> <value type="string" value="ccp"/> </property>
- The ccp value will tell Compiz to load your previous Compiz settings as configured with CompizConfig Settings Manager (ccsm).
- If the xfce4-session.xml file does not exist in
~/.config/xfce4/xfconf/xfce-perchannel-xml
then you will need to edit the file in/etc/xdg/xfce4/xfconf/xfce-perchannel-xml
To prevent the default session from being overwritten you may also add this:
<property name="general" type="empty"> ... ... <property name="SaveOnExit" type="bool" value="false"/> </property>
Then you will need to remove the existing sessions:
$ rm -r ~/.cache/sessions
Now you will need to log out. Ensure that the 'Save session for future logins' option in the logout dialogue is unticked or the edit will not take effect. Log in and Compiz should start. Once you are sure Compiz is running you can tick the Save session 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 Compiz should start.
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. Below is an example of a ~/.xinitrc
file which starts Compiz (through fusion-icon), the tint2 panel and the Cairo dock.
~/.xinitrc
tint2 & cairo-dock & exec fusion-icon
To add a root menu similar to that in Openbox and other standalone window managers you must install the package compiz-deskmenuAUR. Upon a restart of Compiz, 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 the Commands plugin section, within the 'General' tab, 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
.
Aletrnatively you can use mygtkmenuAUR, which is also in the AUR.
Allow users to shutdown/reboot
If you are using policykit you can add the command to CCSM > General > Commands and assign a short-cut key to it or alternatively you can use a launcher application. See here for further information.
Tips and tricks
Fallback
If you are using KDE, GNOME or Xfce and you are experiencing problems, for example you don’t see borders for your window, you can switch back to the default DE window manager with this command:
wm_name --replace
with kwin
, metacity
or xfwm4
instead of wm_name
.
Keyboard shortcuts
Below is a list of the default keyboard shortcuts for Compiz. The 'Commands' plugin needs to be activated in the CCSM panel.
- Switch windows =
Alt+Tab
. - Switch to next desktops =
Ctrl+Alt+←
. - Switch to previous desktop =
Ctrl+Alt+→
. - Move window =
Alt+Left click
. - Resize window =
Alt+Right click
.
A more detailed list can be found under CommonKeyboardShortcuts in the Compiz wiki or you can always just look at your plugin's configuration.
Enable window snapping in Compiz
If you want to compare two windows side by side by dragging them to the edges of the screen, similar to the 'Aero Snap' feature introduced in Windows 7, enable the 'Grid' plugin in ccsm
. If you are using the 'Desktop Wall' or 'Rotate Cube' plugin then disable the 'Edge Flip' options in that plugin's section to ensure that windows do not move to the next desktop when dragged to the screen edge.
ccsm
labelled 'Snapping Windows' merely adds resistance to the edges of the screen. It does not resize windows that are dragged to the screen edge.Profiles
Profiles allow you to switch between different sets of Compiz settings easily. To create a new profile open ccsm
and click on the 'Preferences' tab. Under 'Profile' click the plus sign to add a new profile or the minus sign to delete one. All changes made in ccsm
will be written to your current profile.
- Profiles are specific to the backend you are using. For instance, if you are using the gsettings backend then any new profile you create will be a gsettings profile. If you switch to a different backend then your current profile will not work and you will automatically switch to a profile available for that backend.
- If you see more than one profile named 'Default' this is likely because you have used more than one backend e.g. you will have a default profile for ini and a default profile for gsettings or gconf.
Changing the backend
By default Compiz stores its configuration settings in a plain text file ~/.config/compiz-1/compizconfig/Default.ini
. In ccsm
this is known as 'Flat-file Configuration Backend.'
Compiz can also store its settings in the gsettings or gconf databases. To change how Compiz saves its settings open ccsm
and click on the 'Preferences' tab in the left hand column. Then choose your desired backend from the list under 'Backend.'
You can also change the backend manually by editing the ~/.config/compiz-1/compizconfig/config
file.
Edit the line below:
backend = ini
- ini = Flat File Configuration Backend
- gsettings = GSettings Configuration Backend
- gconf = GConf Configuration Backend
Once you have edited and saved the file the change will take place immediately. There is no need to log out.
Troubleshooting
All windows start maximised
If all windows in Compiz start maximised then open ccsm
, click on the 'Place Windows' plugin and set the 'Placement Mode' to 'Smart.'
No Alt-F2 run dialog in MATE
If you are using Compiz in MATE follow the instructions below to restore the Alt-F2 run dialog.
Start ccsm
. Ensure that the 'Commands' plugin is ticked. Click on the 'Commands' button and enter the following command in a free command line box e.g. 'Command line 0'
mate-panel --run-dialog
Then click on the 'Key Bindings' tab. Click on the button labelled 'Disabled' for the appropriate command line box e.g. if you entered the command in 'Command line 0' click the 'Disabled' box adjacent to 'Run command 0.' In the box that appears tick the 'Enabled' option. Then click the 'Grab key combination' button and hit Alt-F2. Click 'Ok.'
ccsm
, click on 'General Options' and click on the 'Focus & Raise Behaviour' tab. Change the 'Focus Prevention Level' setting to 'Off.'Missing GLX_EXT_texture_from_pixmaps
On ATI cards (first solution)
If you 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 (which is what you are using).
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
Once you have it copied, you can reinstall your fglrx drivers. Now you can start Compiz using the following example syntax:
LD_PRELOAD=/usr/lib/mesa/libGL.so.1.2 compiz --replace &
On ATI cards (second solution)
Another problem that could arise is with 'GLX_EXT_texture_from_pixmap.' it is possible that the card could only render it indirectly. If so, you have to pass the option to your libgl as shown below:
LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp &
(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, run the following command to run Compiz (This must be used every time).
LIBGL_ALWAYS_INDIRECT=true compiz --replace --sm-disable ccp &
As at 17-Oct-07 the Compiz-Fusion Wiki states: "If you are using an Intel GMA card with AIGLX, you will need to start Compiz Fusion with LIBGL_ALWAYS_INDIRECT=1 appended."
Compiz effects not working (gconf backend)
If you have installed compiz-decorator-gtk
:
Check if GConf schema was correctly installed:
$ gconftool-2 -R /apps/compiz/plugins | grep plugins
make sure that all plugins are listed (not only fade!). If not, try to install Compiz schema manually (do this as normal user, not as root!!!):
$ gconftool-2 --install-schema-file=/usr/share/gconf/schemas/compiz-decorator-gtk.schemas
Compiz starts without window borders with NVIDIA binary drivers
Firstly ensure that you have configured the settings discussed here correctly. If window borders still do not start try adding Option "AddARGBGLXVisuals" "True" and Option "DisableGLXRootClipping" "True" to your "Screen" section in the config file 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.
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:
$ gconftool -s /apps/compiz/general/screen0/options/sync_to_vblank-t boolean false
fusion-icon doesn't 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/
Poor performance from capable graphics cards
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. This workaround has been tested on both NVIDIA and Intel chips.
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/*.conf
, and then restarting your computer:
Option "DynamicTwinView" "False"
Screen flicks with NVIDIA card
To fix it, create the following:
/etc/modprobe.d/nvidia.conf
options nvidia NVreg_RegistryDwords="PerfLevelSrc=0x2222"
See also
- Compiz website, including wiki and forum
- Compiz development
- Troubleshooting page on Compiz wiki
- Emerald page on Compiz wiki
- Emerald Theme Manager page on Compiz wiki
- Additional themes