For a long time I’ve wanted to fiddle around with compiz’s code, but some months ago an announcement from one of the main developers suggested that the future of the project was uncertain, which got me a little down. However, a few days ago I was happy to read that the project had renewed energies, and a lot of work was being made towards quality and stability. This gave me the push I needed to finally get into it.
I recently installed the last version of Ubuntu in my new desktop PC, moving from the Arch I was running in my notebook, so the instructions that follow will apply at least for Ubuntu 12.04 (Precise Pangolin). The first thing I did was looking for the code base, which I found in Launchpad. I’m not sure if they’ve definitely moved from git to Bazaar, of if I run into the Ubuntu branch of compiz.
Anyway, after creating my Launchpad account and installing Bazaar, I configured ssh-keys for my PC and then logged in:
$ bzr launchpad-login brazzi64
Then, created my local branch from the code in Launchpad:
Once the code finished downloading I followed the instructions in the INSTALL, not without running into several missing dependencies in the process. This following commands should deal with them and allow compiz to build successfully (I’m using aptitude, but the same thing can be done with standard apt-get):
1 2 3 4 5 6 7 8
| # install the necessary tools first
$ sudo aptitude install cmake cmake-curses-gui intltool xsltproc
# install the library dependencies for building
$ sudo aptitude install libxrender-dev libwnck-dev libgnome-desktop-dev
libmetacity-dev libx11-xcb-dev libxml2-dev libgconf2-dev libprotobuf-dev
libnotify-dev librsvg2-dev lcov libboost-dev libboost-serialization-dev
mesa-common-dev libgl1-mesa-dev libglu-dev libjpeg-dev |
Then we continue the process, with some tweaks. First of all, we will modify a couple of files in order to get the custom built version of compiz to store its settings in a different gconf path, avoiding conflicts with the current installation. The one installed in my running session (I’m currently using Gnome Classic instead of Unity) is in /app/compiz-1; this modification makes it store it in /app/compiz-built-1. This diff shows the necessary changes.
After applying this changes, we prepare the makefiles specifying the path where we want compiz installed:
$ mkdir build
$ cd build
$ cmake .. -DUSE_KDE4=OFF -DCMAKE_INSTALL_PREFIX=/opt/compiz-built
The only missing dependency I have left is the following, for which I couldn’t find the necessary package:
-- checking for modules 'gnome-window-settings-2.0;gnome-desktop-2.0'
-- package 'gnome-window-settings-2.0' not found
If you know how to get this dependency met, the tip will be welcome : ) This may be the reason that the output for this command reports “gnome: No” under “Optional features”, but however, compiz seems to run ok. Next:
with which the building starts. After some minutes you should see this last line indicating success:
[100%] Built target workarounds
Then we install it in our specified location (for which I need root access) just by:
Before trying to run it, we have to install the generated gconf schemas into our user session. For this:
$ find /opt/compiz-built/share/gconf/schemas -exec
gconftool-2 --install-schema-file={} ;
Finally, we can run compiz replacing the current running instance with the following command. It specifies LD_LIBRARY_PATH for it to load the newly built plugins instead of the ones previously installed in the system, and indicates ‘ccp’ to be loaded at start-up. This is the configuration loading plugin, which will enable compiz to read its settings from gconf and load additional plugins and their settings as specified:
# run compiz and detach it from the terminal
LD_LIBRARY_PATH=/opt/compiz-built/lib
/opt/compiz-built/bin/compiz --replace ccp &
In order to configure this running instance of compiz, you need to run the corresponding newly created CompizConfig Settings Manager (ccsm), which will read and store the settings in the gconf path we specified at build time (/apps/compiz-built-1):
PYTHONPATH=/opt/compiz-built/lib/python2.7/site-packages
LD_LIBRARY_PATH=/opt/compiz-built/lib
/opt/compiz-built/bin/ccsm &
That should be it. Please let me know if you run into any issues or if I made any mistake and I’ll try to do something about it.
Thanks for reading!