#!/bin/bash
##############################################################
verify_ecomorph(){
while true
do
sleep 8
if ! ps aux | grep -v grep | grep -q ecomorph.sh
then
ecomorph.sh &
sleep 3
if ! ps aux | grep -v grep | grep -q ecomorph.sh
then
zenity --error --text="ERROR: Compiz (ecomorph) is not running, looks like your hardware is not supported correctly (no 3d?), this causes a useless and buggy Enlightenment 17 (try to switch desktops, for example), please use a Normal Elive version instead. For now, go to the E17 Configurations and search the 'Profiles' part and switch the ecomorph selected one to 'default'"
fi
fi
done
}
##############################################################
ecomorph.sh &
pid1=$!
sleep 1
emerald &
pid2=$!
#( sleep 5 ; ecomorph.sh & ) &
#( sleep 7 ; emerald & ) &
[[ -d /elive ]] && ( sleep 15 ; iceweasel /usr/share/doc/ecomorph/howto.html & ) &
verify_ecomorph &
pid_verify=$!
enlightenment_start -evil
kill $pid_verify || kill -9 $pid_verify
kill $pid1 || kill -9 $pid1
kill $pid2 || kill -9 $pid2
killall enlightenment_start
killall enlightenment