Compiz Fusion 0.5.2 from source on Ubuntu Feisty
O.K. Last night I followed this very well refined Howto on the Compiz Fusion forums. It works like a charm… In fact there isn’t really much to add, but I’ll explain a few steps along the way. And make a few comments where something might be interesting.
The finished CF works really well on my PC (An AMD 3200+ with a rather old and shabby Nvidia 6200 card). Some of the new effects are very cool (your windows can fold up like a paper aeroplane and the Shift Switcher is pretty neat) and the whole thing feels very smooth - especially the cube rotation and expo.
Here we go then.
Firstly, this build is for a normal Ubuntu Feisty setup. That means we are talking Gnome (not KDE or XFCE). Also, as I only have a Nvidia graphics card, that’s what you get here. The HowTo does explain what to do if you have ATI or Intel cards, but I can’t comment.
As a safeguard I strongly recommend you first remove any existing compiz, beryl, compiz fusion stuff you have previously installed. Search through synaptic and uninstall everything that’s relevant.
All building, downloads etc I did in a single directory under my home_dir (~). I called it “compiz”.
This build is from source code and so won’t be recorded in the package manager. Therefore, you will probably want to keep this directory tree around so, you can - in the future - use make uninstall to remove this software; for example when the Ubuntu repo gets updated to include the latest and greatest.
Having just said that - I have read reports that local compilation provides better performance than a “one-size-fits-all” build that you get from a deb repository. I don’t have the time or inclination to test this theory but I am a big fan of building things from source. I do believe you get a better system and much less baggage too. You also grok (really understand) your system much better.
For those who are interested in learning more - I REALLY REALLY recommend you take a look at Linux From Scratch. You will learn more than you ever thought possible, and it will help you in trouble shooting your own systems (whatever they are) when you come back to whatever distro is your preference.
Finally - I also found a script yesterday, that purports to do what you see below automatically. I downloaded it and tried it but it is wanting in a number ways. It failed for me, it made too many assumptions about my system and tried to install stuff that I neither wanted or needed. In short you lost control… It isn’t hard to find it on-line but I don’t recommend it. The whole process below only took me about an hour. Took me much longer to write up though
Following the Howto, first of all get all the tools needed to build from source:
sudo apt-get install git-core automake build-essential intltool libtool python-pyrex python2.5-dev
sudo apt-get build-dep compiz
Git is interesting. It is a version control system similar in some respects to SVN (Subversion) and CVS (Concurrent Versioning System). It is used by some pretty big software projects including the Linux Kernel.
Make and then move into our directory:
mkdir ~/compiz
cd ~/compiz
Get the compiz core 0.5.2 tarball and extract it:
wget http://xorg.freedesktop.org/archive/individual/app/compiz-0.5.2.tar.gz
tar xf compiz-0.5.2.tar.gz
Now get all the packages (in source code form) from their git repository:
git clone git://anongit.compiz-fusion.org/fusion/libraries/bcop
git clone git://anongit.compiz-fusion.org/fusion/compizconfig/ccsm
git clone git://anongit.compiz-fusion.org/fusion/compizconfig/libcompizconfig
git clone git://anongit.compiz-fusion.org/fusion/compizconfig/compizconfig-python
git clone git://anongit.compiz-fusion.org/fusion/plugins-main
git clone git://anongit.compiz-fusion.org/fusion/decorators/emerald
git clone git://anongit.compiz-fusion.org/fusion/decorators/emerald-themes
git clone git://anongit.compiz-fusion.org/users/crdlb/fusion-icon
Also retrieve two optional packages that are well worth having:
git clone git://anongit.opencompositing.org/fusion/plugins-extra
git clone git://anongit.opencompositing.org/fusion/plugins-unsupported
We are now ready to build. Move into the directory we made when we extracted the compiz tarball earlier and run the standard CMMI command (C=Configure, M=Make, MI=Make Install):
cd ~/compiz/compiz-0.5.2
./configure --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
The double ampersands are a useful thing - they check for successful completion of the previous command before proceeding to the next. You will be prompted for your password before the make install command is run as you require root privileges to write to the /usr hierarchy. The cd - command takes you back to your previous directory.
Let the system know where to find the configuration information.
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Now we build the packages we downloaded earlier by moving into the relevant directories and running the commands as shown and in this order:
cd ~/compiz/bcop
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
cd ~/compiz/libcompizconfig
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
cd ~/compiz/compizconfig-python
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
cd ~/compiz/plugins-main
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
This is the configuration manager which is a Python application and so has a different build and install command sequence:
cd ~/compiz/ccsm
sudo python setup.py install &&
cd -
cd ~/compiz/emerald
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
cd ~/compiz/emerald-themes
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
cd ~/compiz/plugins-extra
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
I had a problem with building this package. It failed to compile looking for a header called text.h. A bit of googling showed me this is installed by the plugins-main package so I went back and rebuilt the plugins-main package, made sure it installed properly then came back to here. Second time around it built fine.
cd ~/compiz/plugins-unsupported
./autogen.sh --prefix=/usr/local --disable-kde && make && sudo make install &&
cd -
This makes sure that your Xorg configuration is correctly setup to work with the Nvidia binary driver. If you are using ATI or Intel graphics chipsets, please see the HowTo for what to do with them.
sudo nvidia-xconfig --add-argb-glx-visuals -d 24
This is the new startup package that starts CF itself and provides a small icon on your toolbar (top right by default) that gives you access to the various configuration applications and options:
cd ~/compiz/fusion-icon
make &&
sudo make install &&
cd -
That’s it. Compiz Fusion is now built and installed. To run it from your terminal type fusion-icon &. To have it start automatically, add the command fusion-icon to your System>Preferences>Sessions utility and give it a meaningful name.
If you find a package fails to compile, as I had above, try getting the very latest code by pulling the source back from the git repository. Enter the relevant directory for each package and simply type git-pull. This will check for any file changes and upload only those that have changed. Then use the CMMI command above to rebuild and install as before.
I hope this is useful and have a lot of fun…
Update 01/09/07. Diego asked me to post my xorg.conf. Here it is:
=======Begin xorg.conf=======
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Thu Nov 9 17:55:20 PST 2006
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type “man xorg.conf” at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section “ServerLayout”
Identifier “Default Layout”
Screen “Default Screen” 0 0
InputDevice “Generic Keyboard”
InputDevice “Logitech MX1000″ “CorePointer”
EndSection
Section “Files”
# path to defoma fonts
FontPath “/usr/share/fonts/X11/misc”
FontPath “/usr/share/fonts/X11/cyrillic”
FontPath “/usr/share/fonts/X11/100dpi/:unscaled”
FontPath “/usr/share/fonts/X11/75dpi/:unscaled”
FontPath “/usr/share/fonts/X11/Type1″
FontPath “/usr/share/fonts/X11/100dpi”
FontPath “/usr/share/fonts/X11/75dpi”
FontPath “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType”
EndSection
Section “Module”
Load “i2c”
Load “bitmap”
Load “ddc”
Load “extmod”
Load “freetype”
Load “glx”
Load “int10″
Load “vbe”
EndSection
Section “InputDevice”
Identifier “Generic Keyboard”
Driver “kbd”
Option “CoreKeyboard”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″
Option “XkbLayout” “gb”
Option “XkbOptions” “lv3:ralt_switch”
EndSection
Section “InputDevice”
Identifier “Logitech MX1000″
Driver “evdev”
Option “Name” “PS2++ Logitech MX Mouse”
Option “HWHEELRelativeAxisButtons” “7 6″
EndSection
Section “Monitor”
Identifier “Generic Monitor”
HorizSync 28.0 - 64.0
VertRefresh 43.0 - 60.0
Option “DPMS”
EndSection
Section “Device”
Identifier “nVidia Corporation NV37GL [Quadro FX 330/GeForce PCX 5300]”
Driver “nvidia”
EndSection
Section “Screen”
#Option “AllowGLXWithComposite” “True”
#Option “RenderAccel” “True”
Identifier “Default Screen”
Device “nVidia Corporation NV37GL [Quadro FX 330/GeForce PCX 5300]”
Monitor “Generic Monitor”
DefaultDepth 24
Option “NvAGP” “0″
Option “DamageEvents” “True”
Option “UseEvents” “True”
Option “TripleBuffer” “True”
Option “NoLogo” “True”
Option “AddARGBGLXVisuals” “True”
SubSection “Display”
Depth 1
Modes “1280×1024″ “1152×864″ “1152×768″ “1024×768″ “800×600″ “640×480″
EndSubSection
SubSection “Display”
Depth 4
Modes “1280×1024″ “1152×864″ “1152×768″ “1024×768″ “800×600″ “640×480″
EndSubSection
SubSection “Display”
Depth 8
Modes “1280×1024″ “1152×864″ “1152×768″ “1024×768″ “800×600″ “640×480″
EndSubSection
SubSection “Display”
Depth 15
Modes “1280×1024″ “1152×864″ “1152×768″ “1024×768″ “800×600″ “640×480″
EndSubSection
SubSection “Display”
Depth 16
Modes “1280×1024″ “1152×864″ “1152×768″ “1024×768″ “800×600″ “640×480″
EndSubSection
SubSection “Display”
Depth 24
Modes “1280×1024″ “1152×864″ “1152×768″ “1024×768″ “800×600″ “640×480″
EndSubSection
EndSection
Section “Extensions”
Option “Composite” “Enable”
Option “DAMAGE” “Enable”
Option “RENDER” “Enable”
EndSection
======= End xorg.conf =======








