if you don't already have the compiz packages installed, you will probably want to install compiz-plugins, compiz-plugins main, compiz-plugins-extra [optional], compiz-kde for kde or compiz-gnome on gnome. emerald isn't required for compiz to work although it's generally a good addition to compiz as it handles themes which are very customizable. compizconfig-settings-manager [under debian there is an unofficial repo, alternatively you can compile from source] compizconfig-settings-manager is a very useful package to have as it is very simple to configure compiz through this handy GUI.
compiling compiz from source:
the first thing you need to do before the actual compiling takes place is to get the dependencies:
sudo aptitude install compiz-dev compiz-bcop build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamage-dev libxinerama-dev libstartup-notification0-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev libmetacity-dev librsvg2-dev libdbus-1-dev libdbus-glib-1-dev libgnome-desktop-dev libgnome-window-settings-dev gitweb curl autoconf automake automake1.9 libtool intltool libxslt1-dev xsltproc
then you need to download and then unpack the source tar-ball(s):
the source files can be downloaded from http://releases.compiz-fusion.org/ generally using the stable code base is best, this is generally separated from the development version by a fairly wide version gap, right now for example, the highest version of compiz (stable) is .5.2 while the development versions are 0.6.0 and 0.6.0.1. clicking the link leads you to a list of source files of two types, the first is tar.gz which can be decompressed with this command:
tar -zxvf filename.tar.gz
and the other type is a tar.bz2 file and this can be decompressed with this command:
tar -xvjf filename.tar.bz2
make sure you're in the directory containing the makefile. to see what files exist in your current directory use the command
which shows all files in the current directory including hidden files. once you're in the right directory,you should use this command:
./configure --prefix=/usr/local
rather than just ./configure then
make && sudo make install
although personally, I would recommend that the install be done using checkinstall [sudo aptitude install checkinstall] which is a nice utility that allows you to compile a deb from source code. in this case, it makes it a lot nicer to manage in your package manager of choice as well as uninstall if need be. the command to do this is:
make && sudo checkinstall
http://wiki.compiz-fusion.org/Get_Compiz_Fusion is a good reference for installing compiz using the common repos, git and compiling from source.
a little background on compiz: compiz is a window-manager that makes use of 3d accelerated graphics card capabilities. because compiz is a window-manager like kwin which is kde's window-manager or metacity which is gnome's window-manager it can take their place. to switch window-managers, the general command is
where the name of your window-manager of choice replaces windowmanager in the command. for example, switching from kwin to compiz in kde is done with the command
it works the same under any desktop environment that also has a separate window-manager such as gnome, kde or xfce. it does not work under fluxbox because fluxbox *is* also a window-manager. The first time you start compiz it is suggested that you do so from a terminal rather than using alt + f2 to run the command. why? because when you run compiz from the terminal window you get lots of output including output about any errors that occur. sometimes it fails because your graphics card is blacklisted. A simple workaround for this [warning! there's a reason they're blacklisted] is to comment out the specific line containing the relevant pci id like this:
original line in /usr/bin/compiz:
# blacklist based on the pci ids
# See http://wiki.compiz-fusion.org/Hardware/Blacklist for details
T=" 1002:5954 1002:5854 1002:5955" # ati rs480
T="$T 1002:4153" # ATI Rv350
T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965
T="$T 8086:2972" # i965 (x3000)
T="$T 1002:3152 1002:3150 1002:5462 1002:5653 " # ati X300 X600,X600 X700
BLACKLIST_PCIIDS="$T"
unset T
which if your card is pci id 1002:4153 you'd comment it out like this:
# See http://wiki.compiz-fusion.org/Hardware/Blacklist for details
T=" 1002:5954 1002:5854 1002:5955" # ati rs480
#T="$T 1002:4153" # ATI Rv350
T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965
T="$T 8086:2972" # i965 (x3000)
T="$T 1002:3152 1002:3150 1002:5462 1002:5653 " # ati X300 X600,X600 X700
BLACKLIST_PCIIDS="$T"
unset T
although chances are you don't really know which one is the culprit so commenting out all 5 lines may be the way to go. The second problem that may happen is that your graphics card driver isn't whitelisted. if that's the case, in the same file [/usr/bin/compiz] you'll need to add the driver you're curently using to the line beneath # Driver whitelist this line is just above the section listing blacklisted pci ids. here's what it should look like w/ sontext:
FALLBACKWM_OPTIONS="--replace $@"
# Driver whitelist
WHITELIST="fglrx"
# blacklist based on the pci ids
in this case, fglrx is the driver being used which needs to be whitelisted. this is normally the case with ATI based cards.
if you get an error like xgl missing or something along those lines, make sure you have the package xserver-xgl installed as well as the compiz components.
restart x (alt ctrl backspace then restart xserver) otherwise compiz probably won't work (you'll get an error about not having xgl w/out restarting x)
how to use compiz once it's working
once you get it to work correctly, that is to say that your windows should look noticeably different, when you close a window, the default animation should be functioning as well. once that is working ok you can go into compizconfig-settings-manager [ccsm is the command] and start tweaking settings. here's a few to get to know how to use:
Desktop
Desktop Cube this allows you to switch desktops using the command ctrl + alt + [left arrow] and ctrl + alt + [right arrow] which doesnt actually need to be a cube, it is a flat plane for 2 desktops, tetrahedron [3d-triangle] for 3 to change the number of desktops under compiz-config [ccsm] go to general options which is under General [the very top] then to Desktop Size and adjust to your liking [recommended horizontal 4 or so, vertical 1 total =4] which gives the cube with the sides being desktops and the top/bottom being "capped" with an image if you enable Cube Caps. under Desktop Cube, you can change various properties of the desktop switching animation under behavior [3'rd from the left tab] experiment with the values if you like, you can always return them back to defaults by clicking the buttom to the right of their values.
Expo this plugin is interesting in that when you activate it, it shows all of your desktops lined up left to right with the ability to drag windows between desktops. you can chnage the keyboard shortcuts to initiate this by going to actions>>bindings and clicking the area two lines below "Key" this allows you to key in the shortcut as you would if you wanted to initiate the effect. you can change the time it takes to zoom under behavior and the time for double clicks under bindings.
Rotate Cube this plugin is needed for rotate cube along with the desktop cube plugin.
pointer sensitivity controlls how much the cube rotates relative to your dragging the cube around. the higher the number, the mroe it rotates when your drag the cube face. you can drag the cube to rotate it by holding down your middle mouse mutton [left+right simulataneously is another way] from the desktop. An alternative method of rotating the cube that works over windows as well [middle mouse only works over open desktop space] is holding down alt + ctrl and dragging the cube to rotate it with the left mouse button. if you haven't already, you might want to increase pointer sensitivity as it is quite sluggish with the default sensitivity. speed also increases the rate at which the cube rotates as switching via alt ctrl left/right arrow. zoom is 0 by default and increasing this zooms out away from the cube while you rotate. at higher values the cube becomes very small so keeping it between 0 and 1.00 or so will probably be just fine. acceleration controlls how quick the cube snaps back from wherever you dragged it to be flat face with your screen, lower values take much longer to go back to normal which is likely a little annoying so keeping this at at least 1 or so might be a good idea.
Viewport switcher [you probably should leave it checked]
Effects
Animations this one isn't like the others, it has many many options for animations rather than jsut a few like the others. you can try each one by adding it to the animation selection field for each tab- each tab is a different action such as closing a window, roll up [double click title-bar] focus, minimize or maximize. you can tweak each effect's settings under the effects settings tab. anything from the # of paritcles of fire in the burn animation [window burns like a sheet of paper on fire] to the direction and/or color of the burn etc. under the duration drop down on the animation selection field where you picked what animation you want for each effect, you can change the length of the effect in milliseconds [1/1000ths of a second]
Cube Gears this adds a geat animation inside your desktop cube when you're rotating it. best seen if the cube's transparency is high
Cube Reflection a surface underneath the cube reflects a desired amount of the light
Water Effect adds a few interesting effects like rain which looks like rain hitting a fluid surface with windows or your desktop reflected off the impinged surface. you can also cause a fluid like effect on the outer edges of windows if your graphics card supports it. generally this plugin in particular uses more processing power than the others so enabling and using it may slow compiz a bit.
Window Decoration controls shadow effects on windows
Wobbly Windows this is arguably one of the better known plugins for good reason. enabling this plugin allows your windows to wobble like jello and also controls the "friction" windows encounter when you throw them across the screen. setting spring k [spring constant, the rigidity of the wobbling] lower values will take a long time to stop wobbling, while the window wobbles, you will not be able to do much with it so setting it to about 1 or so can be very troublesome. best to leave it around where it is [10] by default. friction is set to 4 by default which you may or may not like. setting it to very low values can allow you to throw a window out of sight very quickly. the entire time it is sliding, it will wobble so it can be a problem getting it stopped where you like if this is set too low. a value around 1.5-3 will probably be a good setting for friction- you can throw it a little and yet it won't scurry off of the screen never to be seen again.
Extras
Benchmark shows the current frame-rate, this fluctuates depending on use.
screenshot allows you to take a screenshot including during rotating between desktops
Splash every time compiz starts [at boot or by running the compiz --replace command] a splash screen is shown with option to change the image used, time displayed and transparency.
Window Previews displays a preview thumbnail for windows that you hover your cursor over the listing on your taskbar on your panel. you can change the size of the thumbnails as well as the time it takes for them to show/disappear and the border size of the thumbnail view.
Image Loading unless for some reason these somehow screw something up [I've never seen this] you should leave these enabled.
Utility
Crash Handler allows you to fall-back to a specified window manager if compiz crashes. don't try to have compiz switch to its self as the backup as that is pointless, use kwin or metacity.
cube caps this plugin allows you to specify image wallpapers for the top and bottom of your cube,
Video Playback and Workarounds these generally should be enabled exect that you may have problems with the Legacy Fullscreen Support option under workarounds as this doesn't seem to work correctly under certain programs, especially openoffice- if you have a problem with fullscreen [openoffice is annoying with this option turned on] you might want to turn this one off.
Window Management
Application Switcher this allows you to switch windows using alt-tab
Move Window you can set this to a keyboard shortcut allowing you to grab a window anywhere not jsut on the title-bar allowing you to throw it anywhere you like.
Place Windows this plugin allows you to specify generally where a new window will be found on your screen. If you notice that windows are placed in "odd" places it is likely because this plugin is set to "smart" much better to have it set to "centered" instead.
Ring Switcher this plugin allows you to switch between windows by arranging them into a ring which when switching windows rotates the windows in clockwise or counter-clockwise motion depending on whether you use the left or right arrows to switch.
Scale this plugin allows you to specify the manner in which windows are resized, real-time or just an outline with the window appearing again after you've resized its boundaries. generally the frame resize method is much faster but frankly "uglier" than te real-time option.
EMERALD
emerald is separate from compiz although the two work very nicely together. you can customize themes nearly endlessly with many different "engines" colors etc. with the option of downloading GPL'ed [free as in GNU] or non-GPL'ed [free as in beer?] although you need to have subversion installed for you to be able to download new themes. each them can be customized to your liking [they are great templates] so downloading them is a good idea. note that the themes don't apply immediately. they will at the least be applied the next time you restart.