home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.admin:6258 comp.unix.aix:11691
- Newsgroups: comp.unix.admin,comp.unix.aix
- 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
- From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
- Subject: Re: determining if you are in an x-windows session
- Message-ID: <1992Nov18.191057.11915@cc.ic.ac.uk>
- Sender: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
- Nntp-Posting-Host: cscgc
- Reply-To: cmaae47@imperial.ac.uk
- Organization: Imperial College of Science, Technology and Medicine
- References: <1992Nov16.132809.10942@wap.oau.org>
- Distribution: usa
- Date: Wed, 18 Nov 92 19:10:57 GMT
- Lines: 24
-
- In article <1992Nov16.132809.10942@wap.oau.org>, bdixon@wap.oau.org (Bill Dixon) writes:
- - Very simply: is there any way to tell whether you are executing a program
- - from within an x-windows session, as opposed to an ascii terminal? The
- - TERM environment variable may or may not be set to aixterm.
-
- You could try the DISPLAY variable, but it not really good enough.
- If it is not defined, you could still be executing in the target of an
- rlogin or telnet running in a xterm, if it is defined, it may be the user
- has just defined it to dome default string in the .profile or .login
- file, but happens to be logged in from a modem and has not started X.
-
- So maybe you just open a window and wait for the error codes to roll in,
- but if you have a false positive and create command windows on a random
- screen you will open massive security holes ....
-
- Thomas
-
-
- --
- *** This is the operative statement, all previous statements are inoperative.
- * email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
- * voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
- * snail: Imperial College of Science, Technology and Medicine
- * The Center for Computing Services, Kensington SW7 2BX, Great Britain
-