bash script help

Fraser Campbell fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Sun Jun 20 15:05:06 UTC 2004


On June 20, 2004 03:23 am, Noah John Gellner wrote:

> the console the script keeps running and outputting messages to the
> display reporting that no display is found.
>
> I am hoping that someone can tell me how to modify the script to test if
> X is running, and if not to terminate the loop.

Your script is probably just relying on $DISPLAY, why not:

  [ -z "$DISPLAY" ] && exit

-- 
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list