Focus windows when started or opened

InUbuntu new dialogues or activated programs don't always get the primary focus. You have to activate them with their icon in the task-bar. That is very annoying but easy to change.

First you need to install Compiz settings manager.

in a terminal type:

sudo apt-get install compiz compizconfig-settings-manager

and enter your linux login password.

Then start compiz from the dash. (click dash (left upper corner) and type "compiz"

Select "Focus and Raise behaviour" in "General settings" and set "focus prevention level" on "off" instead of "low".

thats it.