Advertisement
Guest User

Untitled

a guest
Jun 9th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. #! play-only.sh
  3.  
  4. FILE=/tmp/$(basename $0).pid
  5. trap 'rm -f $FILE;' EXIT
  6. if [ -e $FILE ]
  7.     then
  8.         echo "$FILE exists so script must exit"
  9.         exit 2
  10. fi
  11. echo $$ > $FILE
  12. cvlc "$@"
  13. ERROR="[0xad4046f0] xcb_window window error: X server failure
  14. xdg-screensaver: Window 0x03400000 does not exist"
  15. trap 'rm -f $FILE;' EXIT
  16. if [ -e $ERROR ]
  17.     then
  18.         echo "user closed window"
  19.         exit 3
  20. fi
  21. done
  22. exit 0
  23.  
  24. #error message generated in terminal is:
  25.  
  26. #"[0xad4046f0] xcb_window window error: X server failure
  27. xdg-screensaver: Window 0x03400000 does not exist"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement