[comp.windows.x] -nw inconvenient for non X users

rlk@THINK.COM (Robert L. Krawitz) (08/25/87)

[Context of discussion:  Dan was confused because he thought emacs
always tried to come up under X when it was compiled with X.  Turned
out that he set his DISPLAY variable in his .login or the like].

Right now emacs is the only program that I know of that does one thing
under X and something else without X.  This is a documentation problem
-- not everyone knows that DISPLAY is the correct key.

Robert^Z

Date: Tue, 25 Aug 87 12:36:03 CDT
From: liberte@b.cs.uiuc.edu (Daniel LaLiberte)
To: rlk@Think.COM
Subject: Re:  -nw inconvenient for non X users

You're right about the conditional on TERM.  I'll set DISPLAY in my
X startup script.  Someone else suggested an alias that sets DISPLAY
before starting up X.  It was simply easier to always set DISPLAY,
and nothing else ever cared.  emacs.1 should document this at least.

Thanks for you comments.

dan

mberkley@watsup.UUCP (08/30/87)

In article <8708251815.AA25757@dagda.think.com> rlk@THINK.COM (Robert L. Krawitz) writes:
>[Context of discussion:  Dan was confused because he thought emacs
>always tried to come up under X when it was compiled with X.  Turned
>out that he set his DISPLAY variable in his .login or the like].

Not everybody who uses X uses it for xterm.  In the PAMI lab here at
UW, we have 3 X-type display devices and a bunch of vt220's.  The X
displays are used mostly for displaying digital images, for displaying
graphical descriptions of pattern analyses and for previewing
documents.  Most people do their work on a vt220 and then display
their images on one of the three X displays - there just aren't enough
X displays to go around.  That means, that it is normal to have the
DISPLAY env variable set, even though xterm is not being used.

Emacs should cue on the TERM being xterm, rather than the DISPLAY
variable being set.  If I'm really using xterm, then it's guaranteed
that my TERM variable will be xterm, then check the DISPLAY variable
for which display to use.


Mike Berkley, University of Waterloo

************************************************************************
*UUCP:		{allegra,ihnp4,utcsri,utzoo}!watmath!watsup!mberkley   *
*Bitnet:		mberkley@watdcs.BITNET                         *
************************************************************************

guy@gorodish.UUCP (08/30/87)

> Emacs should cue on the TERM being xterm, rather than the DISPLAY
> variable being set.  If I'm really using xterm, then it's guaranteed
> that my TERM variable will be xterm, then check the DISPLAY variable
> for which display to use.

A couple of problems with this:

	1) Having TERM be "xterm" in a process does not in and of itself
	   indicate that it is possible for that process to use X!  Consider a
	   person logged in on an X server machine "a", with an "xterm" window
	   on that machine.  Say this person does an "rlogin" to machine "b",
	   and then subsequently does an "rlogin" to machine "c".  Assume that
	   machine "b" will NOT forward IP packets, so that there is a wall
	   between the network machines "a" and "b" are on, and the network
	   machines "b" and "c" are on, with only bridging services such as
	   mail, "rlogin", "telnet", "finger", etc.  between them.

	   "rlogin" will pass "xterm" over the wire as the terminal type, as it
	   should; however, programs on machine "c" will NOT be able to talk to
	   the X server on machine "a".

	   (Anybody care to guess what, on Saturday morning, I discovered
	   didn't work?  Grumble....)

	2) One could imagine a canned application, run e.g. from a menu,
	   that runs EMACS.  (In fact, this application could *be* EMACS.)
	   Such an application will not necessarily have TERM set to "xterm";
	   how then is EMACS to know that it should use X?
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com