Skip to content

Instantly share code, notes, and snippets.

@oppara
Created November 9, 2008 03:57
Show Gist options
  • Save oppara/23192 to your computer and use it in GitHub Desktop.
Save oppara/23192 to your computer and use it in GitHub Desktop.
bash: run firefox
#!/bin/bash
FF=`ps aux | grep firefox-bin | wc -l`
if [ "$FF" == 1 ]; then
  env DISPLAY=:0. zenity --info --text "I run Firefox" && firefox
else
  env DISPLAY=:0. zenity --info --text "Firefox is running"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment