It usually does work, but as an upgrader, you're sadly bound to experience some kinks here and there. Mind, with the Window Decorations plugin enabled in ccsm (compizconfig-settings-manager), it should launch Emerald (or perhaps gtk-window-decorator) by default, in the compiz startup procedure. And again, check the settings for said plugin, notably the command line.
I'd suggest you grab the fusion-icon package and add an entry in Sessions to start it upon login. It'll put an icon in your systray with which you can manipulate compiz.
To answer your question, such a script you're talking about could look like this, though needlessly elaborate, but I like it that way.
Code:
#!/bin/bash
compiz --replace &
# sleep for 7 seconds to let Compiz load properly, modify figure as you please
sleep 7
if [ "$(pidof emerald)" ]
then
# compiz started emerald, do nothing
else
# not running, start emerald
emerald --replace &
fi
Bookmarks