home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / admin / 6258 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.9 KB

  1. Xref: sparky comp.unix.admin:6258 comp.unix.aix:11691
  2. Newsgroups: comp.unix.admin,comp.unix.aix
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!doc.ic.ac.uk!cc.ic.ac.uk!imperial.ac.uk!vulture
  4. From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
  5. Subject: Re: determining if you are in an x-windows session
  6. Message-ID: <1992Nov18.191057.11915@cc.ic.ac.uk>
  7. Sender: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
  8. Nntp-Posting-Host: cscgc
  9. Reply-To: cmaae47@imperial.ac.uk
  10. Organization: Imperial College of Science, Technology and Medicine
  11. References: <1992Nov16.132809.10942@wap.oau.org>
  12. Distribution: usa
  13. Date: Wed, 18 Nov 92 19:10:57 GMT
  14. Lines: 24
  15.  
  16. In article <1992Nov16.132809.10942@wap.oau.org>, bdixon@wap.oau.org (Bill Dixon) writes:
  17. - Very simply: is there any way to tell whether you are executing a program
  18. - from within an x-windows session, as opposed to an ascii terminal?  The
  19. - TERM environment variable may or may not be set to aixterm.
  20.  
  21. You could try the DISPLAY variable, but it not really good enough.
  22. If it is not defined, you could still be executing in the target of an
  23. rlogin or telnet running in a xterm, if it is defined, it may be the user
  24. has just defined it to dome default string in the .profile or .login
  25. file, but happens to be logged in from a modem and has not started X.
  26.  
  27. So maybe you just open a window and wait for the error codes to roll in,
  28. but if you have a false positive and create command windows on a random 
  29. screen you will open massive security holes ....
  30.  
  31.                                         Thomas
  32.  
  33.  
  34. -- 
  35. *** This is the operative statement, all previous statements are inoperative.
  36. *   email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
  37. *   voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
  38. *   snail: Imperial College of Science, Technology and Medicine
  39. *   The Center for Computing Services, Kensington SW7 2BX, Great Britain
  40.