BASH- Run MPlayer if either there are no users on display :0 or if there is more than one argument
Posted
by rob
on Stack Overflow
See other posts from Stack Overflow
or by rob
Published on 2010-05-23T15:55:33Z
Indexed on
2010/05/23
16:00 UTC
Read the original article
Hit count: 358
This is the script I currently have-
#!/bin/bash
if["$#" == "2" OR who | grep ":0" == ""]
export DISPLAY=:0
xset dpms force on
mplayer -fs $1.mp4
fi
It doesn't work.
Thanks for your help.
© Stack Overflow or respective owner