Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!samsung!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.windows.x Subject: Re: Detection which windowing system I'm in Keywords: open windows,sunview,bare terminal Message-ID: <6277@auspex.auspex.com> Date: 25 Feb 91 22:45:44 GMT References: <1768@svin02.info.win.tue.nl> <500@cronos.metaphor.com> Organization: Auspex Systems, Santa Clara Lines: 22 >If $TERM is set to "xterm" I can expect to be in Xwindows. >If $TERM is set to "sun-cmd" I am in a SunView CommandTool window. Or in an XView commandtool window - i.e., if TERM is set to "sun-cmd", you could well be running in X. >If $TERM is set to "sun" and... > $?WINDOW_ME is true I am in a SunView ShellTool window... See previous paragraph. Note also that you are likely to be in X if TERM is set to "tm19", say.... I.e., there are a number of terminal emulator programs that run under X; "xterm" may be the most popular, but it sure ain't the only one. On top of that, note that if you rlogin to another UNIX machine, say, that has no X support but that does have an "xterm" entry in "termcap" or "terminfo", TERM will be set to "xterm" but you won't be "in X" in the general sense (i.e., you won't be able to fire up some X application on that machine).