How to best setup a test/build environment to be able to test Compiz/Unity hacks and participate in development

Asked by MC Return on 2012-07-18

To be able to test fixes in Compiz/Unity a parallel setup of stock Ubuntu and self-compiled Compiz/Unity versions is needed.

I followed instructions to build Unity from here:
http://askubuntu.com/questions/28470/how-do-i-build-unity-from-source/28472#28472
[Building Unity from Source (current development version 12.04)]

This works so far.

Fetching the latest lp:compiz source and compiling it does also work, but I do not know how to best test a fresh Compiz build and how and where to install it ?

Question information

Language:
English Edit question
Status:
Solved
For:
Compiz Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel van Vugt
Solved:
2012-09-06
Last query:
2012-09-06
Last reply:
2012-08-08
Best Daniel van Vugt (vanvugt) said : #1

I use this (many times per day), in the compiz source directory:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/staging
make install

And then in a VT (Ctrl+Alt+F1):
cd ~/staging
env DISPLAY=:0 LD_LIBRARY_PATH=./lib ./bin/compiz --replace composite opengl move resize decor compiztoolbox mousepoll wall expo animation switcher

That way you're not affecting your system installation. Everything runs from ~/staging.

Bruno Azzinnari (brazzi64) said : #2

I came up with an alternative, where you change the gconf path of your custom built compiz installation, so that it doesn't interfere with your system installation but you're anyway able to configure it through CCSM.

It's documented in my blog, I hope it helps:

http://blog.brazzi64.net/?p=44

MC Return (mc-return) said : #3

Thanks Daniel van Vugt, that solved my question.

MC Return (mc-return) said : #4

brazzi64, thanx to you also. Very interesting link :)

BlackJohnny (blackjohnny) said : #5

Hi!

I have two related questions:

1. How to fully restore the OS's compiz after running it from ~/staging?

If I do in a VT:
     env DISPLAY=:0 compiz --replace
my unity UI is not shown

I want to avoid using always: sudo service lightdm restart

2. When I try to use the method with the staging folder in a VirtualBox (same guest OS version as main) I get a "Error: Another window manager is already running on screen: 0". Any ideas on how to easily deploy in a VirtualBox

Thanks a lot

Daniel van Vugt (vanvugt) said : #6

If you're running the code in ~/staging that should not affect your system installation of compiz at all. However if you use the default config profile then you may have removed the unityshell plugin by mistake. Just run "ccsm", scroll down and click on Unity and tick it to enable the plugin.

If you have "Another window manager is already running ..." then some part of your previous instance is still resident and/or hooked into the X server. You might have to unblock the X server to solve this. Just switch to VT 7 (Ctrl+Alt+F7) and then back again to VT 1 (Ctrl+Alt+F1) or whichever.

BlackJohnny (blackjohnny) said : #7

Thanks Daniel van Vugt! You are right about both questions :)

Deyvi (damos96) said : #8

How do I start ccsm from staging?

Daniel van Vugt (vanvugt) said : #9

I was trying to keep it simple. But some good instructions for running ccsm in staging are in the source code:
    tests/manual/GSettings.txt