InstallationGuideFromSource
Building Unity from Source
You'll need a fully updated Natty system, with the latest compiz and bamfdaemon packages installed.
You'll then need to do do this:
sudo apt-get install libglib2.0-dev libgdk-pixbuf2.0-dev libcairo2-dev libpng12-dev libglew1.5-dev libglewmx1.5-dev libxxf86vm-dev libgl1-mesa-dev libsigc++-2.0-dev libpango1.0-dev doxygen cmake build-essential debhelper pkg-config valac intltool libgee-dev libunique-dev libclutter-1.0-dev libclutter-gtk-0.10-dev libclutk-dev libbamf-dev gsettings-desktop-schemas-dev libgconf2-dev libglib2.0-dev libdbusmenu-glib-dev libgnome-desktop-dev libgtk2.0-dev libpango1.0-dev libgnomeui-dev libdee-dev libindicator-dev libunity-misc-dev libutouch-grail-dev libxcb-icccm1-dev compizconfig-settings-manager compiz-dev libboost-dev libboost-serialization-dev libmetacity-dev python-dev cython gnome-common libpcre3-dev
to get all the dependencies.
You will probably need to grab the latest version of Nux to get Unity trunk going:
bzr branch lp:nux cd nux ./autogen.sh --disable-documentation --prefix=/opt/unity make sudo make install
Tip: Most modern desktops and laptops have several cores. You can greatly speed up the compilation by taking advantage of this. The make command have build in support for this which you can activate using the -jN switch where N is the number of jobs to run in parallel. A good rule of thumb is to run 2 times the number of cores on your processor. Thus on a normal dual core computer you should run make -j4 to minimize the compilation time.
exporting paths:
export PKG_CONFIG_PATH=/opt/unity/lib/pkgconfig:${PKG_CONFIG_PATH} export LD_LIBRARY_PATH=/opt/unity/lib:${LD_LIBRARY_PATH} export LD_RUN_PATH=/opt/unity/lib:${LD_RUN_PATH}
and then Unity:
bzr branch lp:unity cd unity mkdir build; cd build cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=package -DCMAKE_INSTALL_PREFIX=/opt/unity make sudo make install
unsetting paths:
unset PKG_CONFIG_PATH unset LD_LIBRARY_PATH unset LD_RUN_PATH
add this to your /home/$USER/.bashrc
function compiz-unity-setup-env { export PATH=/opt/unity/bin:${PATH} export PYTHONPATH=/opt/unity/lib/python2.7/site-packages }
and finally, once that's installed, you can log out and log in and again and then run compiz-unity-setup-env and then restart Compiz (compiz --replace) and then use CompizConfig Settings Manager (ccsm) to search for and enable the Unity plugin!