From owner-freebsd-questions Fri Jun 1 17:35: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id A6E5C37B424 for ; Fri, 1 Jun 2001 17:35:03 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 63309 invoked by uid 100); 2 Jun 2001 00:35:03 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15128.13495.73861.62048@guru.mired.org> Date: Fri, 1 Jun 2001 19:35:03 -0500 To: John Merryweather Cooper Cc: questions@freebsd.org, cwaiken@icubed.com Subject: Re: Script Question In-Reply-To: <107669883@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Merryweather Cooper 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. 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