jmn@power.berkeley.edu (J. Mark Noworolski) (02/04/91)
Is there a simple way to determine from the shell whether I am running an xterm or not? (Perhaps something better than checking the DISPLAY variable). I know it can be done with a C program, but something a little more elegant would be handy. The reason I want to check this is to decide whether to make my prompt attempt to change the xterm title or not. Thanks in advance, mark -- "There's a really fine line between clever and stupid" Nigel- Lead Guitar (Spinal Tap) jmn@united.berkeley.edu, or jmn@power.berkeley.edu
lew@gsgpyr.gsg.COM (Paul Lew) (02/04/91)
> Is there a simple way to determine from the shell whether I am running > an xterm or not? Check if WINDOWID is defined, for example, in csh/tcsh: if ( $?WINDOWID ) then set prompt = ... else set prompt = ... endif Paul Lew (lew@gsg.gsg.com) UUCP: uunet---samsung--+ General Systems Group, 5 Manor Parkway oliveb---+--gsg--lew Salem, NH 03079 (603) 893-1000 decvax---+