home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / tcl / 2140 < prev    next >
Encoding:
Text File  |  1992-12-20  |  984 b   |  29 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!schwartz
  3. From: schwartz@roke.cs.psu.edu (Scott Schwartz)
  4. Subject: Re: Help on reading shell variable/environment
  5. In-Reply-To: bagwill@swe.ncsl.nist.gov's message of 16 Dec 92 14:30:18 GMT
  6. Message-ID: <BzFM19.5C2@cs.psu.edu>
  7. Sender: news@cs.psu.edu (Usenet)
  8. Nntp-Posting-Host: roke.cs.psu.edu
  9. References: <1glmqfINNfv5@agate.berkeley.edu> <7514@dove.nist.gov>
  10. Date: Fri, 18 Dec 1992 01:40:32 GMT
  11. Lines: 16
  12.  
  13. bagwill@swe.ncsl.nist.gov (Bob Bagwill) writes:
  14.    Joel A. Fine (joel@saffron.CS.Berkeley.EDU) wrote:
  15.    : |> inside TCL/TK?  I need to access the TERM variable so that to prevent my
  16.    : |> TCL/TK program from being run when the user is not in an X window 
  17.         environment.
  18.    : 
  19.    : wish: echo $env(TERM)
  20.    : xterm
  21.  
  22.    Or maybe this:
  23.  
  24.    wish: if {[info exists env(TERM)]} {set term $env(TERM)}
  25.  
  26.  
  27. How about checking for DISPLAY instead.  TERM is irrelevent to X.
  28.  
  29.