home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20461 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: setting DISPLAY env variable
  5. Date: 22 Dec 1992 01:20:36 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 20
  8. Message-ID: <1h5qh4INNc7i@early-bird.think.com>
  9. References: <BzCzvA.42s@constellation.ecn.uoknor.edu> <1h4bp2INNi8u@sol.deakin.OZ.AU> <1992Dec21.130253.1110@ericsson.se>
  10. NNTP-Posting-Host: telecaster.think.com
  11.  
  12. In article <1992Dec21.130253.1110@ericsson.se> etxmesa@eos.ericsson.se (Michael Salmon) writes:
  13. ># Set the default X Windows server name - set to the name of the host
  14. ># the user logged in from, unless it was the terminal server (tserver).
  15. >set displayhost=`who am i | sed -e 's/.*(//' -e 's/).*$//' -e 's/\.chem\.utoronto\.ca$//'`
  16.  
  17. Isn't it a bit presumptuous to assume that the user logged in from the X
  18. server?  In the case of X terminal users, this is extremely unlikely (they
  19. usually have telnet clients, but one normally logs in using XDM).  And if
  20. the user does recursive telnets, the DISPLAY won't be propogated correctly.
  21.  
  22. I've heard of people solving the problem by using rlogin, which propagates
  23. the TERM environment variable automatically.  They use a script that first
  24. concatenates the DISPLAY environment variable onto the TERM variable and
  25. then invokes rlogin.  The .login file on the destination then extracts the
  26. DISPLAY from the TERM variable.
  27. -- 
  28. Barry Margolin
  29. System Manager, Thinking Machines Corp.
  30.  
  31. barmar@think.com          {uunet,harvard}!think!barmar
  32.