Date: Fri, 1 Jun 2001 19:35:03 -0500 From: Mike Meyer <mwm@mired.org> To: John Merryweather Cooper <jmcoopr@webmail.bmi.net> Cc: questions@freebsd.org, cwaiken@icubed.com Subject: Re: Script Question Message-ID: <15128.13495.73861.62048@guru.mired.org> In-Reply-To: <107669883@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
John Merryweather Cooper <jmcoopr@webmail.bmi.net> types: > On 2001.06.01 15:00 Christopher W. Aiken wrote: > > What can I check in a tcsh script to see if X is running? > The DISPLAY environment variable (usually only set when X is running) > would be a good choice. Checking the TERM variable for an xterm > variant might also work (sometimes). DISPLAY is not only sufficient, it's necessary. At least for all the applications I checked. Trying to run them without having DISPLAY set causes them to spit out a "Can't open display" error, and then exit. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15128.13495.73861.62048>