Hi!
I'm trying to write a script in which a message is displayed by xmessage if X is running otherwise message is displayed by echo
I tried this :
if [ -f /tmp/.X0-lock ] then xmessage message
else echo message
However lets suppose that I'm running X and working on a Virtual Console. the file /tmp/.X0-lock would then exist. How do I now display the message using echo ?
Please guide
P.S. I'm using FreeBSD (It's kinda cool ;)). I guess the working of X is same under all Unices.