Wednesday, January 23, 2008

Restart Gnome-Do with Gnome-Do

UPDATE: Now we can by setting the /apps/gnome-do/preferences/enable_updating gconf key to true to resolve this. Thanks Christopher~~

Like the most applications, Gnome-Do can not load the most recent changes you made after you have already launched Gnome-Do. So I wrote this script to resolve this problem. Stupid way, but works, :)

Copy the source code below and save a file named restartdo in /home/[uid]/bin or you wished destination. Then run chmod + x /home/[uid]/bin/restartdo to give this script the ability to execute. Don't forget to replace the [uid] with your user name.

Now, check if your directory already in ~/.do/FileItemSource.config. If not, add in it. Restart your Gnome-Do, try this script, have fun with Gnome-Do.

# vim:sts=4:ai:et:

while (( x-- > 0 )) && {
killall gnome-do >/dev/null 2>&1
ps x | grep Do | grep -v grep >/dev/null 2>&1
sleep 3

if {
ps x | grep Do | grep -v grep >/dev/null 2>&1
echo 'Failed to stop Gnome-Do'
return -1

echo 'Gnome-Do stopped'

while ! {
ps x | grep compiz | grep -v grep >/dev/null 2>&1
sleep 3

exec gnome-do >/dev/null 2>&1 &
echo "Gnome-Do started"


oiyus said...

do ur job. don't be stupid!

Òscar said...

cool! What's the compiz part for?