Skip to content

Instantly share code, notes, and snippets.

@vertrigo
Created June 26, 2012 20:56
Show Gist options
  • Select an option

  • Save vertrigo/2998945 to your computer and use it in GitHub Desktop.

Select an option

Save vertrigo/2998945 to your computer and use it in GitHub Desktop.
gnome-control-script
#!/bin/sh
CMD_W='gnome-shell --replace'
while test 1
do
OUTPUT=`ps -e|grep gnome-shell|grep -v grep`
if ! echo $OUTPUT | grep gnome-shell>/dev/null ; then
echo Restarting...
$CMD_W
else
echo All right...
fi
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment