This works flawlessly on 12.10 and 13.04 for launching compiz at login, though compiz is a bit buggy
Code:
echo -e '#!/bin/bash\nif [ ! -f ~/.Compiz ];then\n\texit\nfi\necho "-------------New-Session-------------" > /tmp/compizLog\nx=0;\nif [ 0`pidof compiz` -eq 0 ];then\n\twhile [ 0`pidof xfwm4` -eq 0 ];do\n\t\tif [ $x -gt 300 ];then\n\t\t\tbreak\n\t\tfi\n\t\tsleep 0.02\n\t\tx=$(($x+1))\n\t\techo "I know you are going to start xfwm4..." >> /tmp/compizLog\n\tdone\nelse\n\techo "----Compiz was already running!----" >> /tmp/compizLog\nfi\ncompiz --replace >> /tmp/compizLog\nstate="$?"\necho "Compiz exited status code: $state" >> /tmp/compizLog\nwhile [[ ! $state -eq 0 || -z "$first" ]];do\n\tsleep 2\n\tif [ $state -eq 0 ];then\n\t\techo "---------Crash--Assumed------------" >> /tmp/compizLog\n\telse\n\t\techo "---------Crash-Detected------------" >> /tmp/compizLog\n\tfi\n\tcompiz --replace >> /tmp/compizLog\n\tstate="$?"\n\tfirst="$state"\n\techo "Compiz exited status code: $state" >> /tmp/compizLog\ndone\necho "-------------End-Session-------------" >> /tmp/compizLog\nif [ 0`pidof compiz``pidof xfwm4` -eq 0 ];then\n\txfwm4 --daemon\nfi\nexit' | sudo tee /usr/local/bin/Compiz
sudo chmod +x /usr/local/bin/Compiz
sudo sed -i "s/ xfce4-session/ Compiz \&\n xfce4-session/" /etc/xdg/xfce4/xinitrc
touch ~/.Compiz
you may want to edit /usr/local/bin/Compiz for emerald, not sure if you need to run a command to launch it
I quit using compiz, you may get some use out of my work
Bookmarks