After upgrading to 11.10 compiz won't start automatically and I have to run
compiz --replace after each reboot. How to start it automatically instead?
If you're running unity 2d, the default, try Dash -> Startup Applications -> Add. Now:
Sleep 2 lets the system wait for 2 seconds before loading compiz, of course it is optional (you can use bash -c "compiz --replace" instead) but it is useful, because it allows the system to be ready to composite the screen correctly. For example it is necessary if you use screenlets, they must be loaded before calling compiz --replace to show correctly.