home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 18819 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.8 KB

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: setting DISPLAY env variable
  5. Message-ID: <1992Dec22.025634.2858@sm.sony.co.jp>
  6. Date: 22 Dec 92 02:56:34 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: Thinking Machines Corporation, Cambridge MA, USA
  10. Lines: 26
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: 22 Dec 1992 01:20:36 GMT
  14. Message-Id: <1h5qh4INNc7i@early-bird.think.com>
  15. Newsgroups: comp.windows.x
  16. References: <BzCzvA.42s@constellation.ecn.uoknor.edu>, <1h4bp2INNi8u@sol.deakin.OZ.AU>, <1992Dec21.130253.1110@ericsson.se>
  17. Sender: xpert-request@expo.lcs.mit.edu
  18.  
  19. In article <1992Dec21.130253.1110@ericsson.se> etxmesa@eos.ericsson.se (Michael Salmon) writes:
  20. ># Set the default X Windows server name - set to the name of the host
  21. ># the user logged in from, unless it was the terminal server (tserver).
  22. >set displayhost=`who am i | sed -e 's/.*(//' -e 's/).*$//' -e 's/\.chem\.utoronto\.ca$//'`
  23.  
  24. Isn't it a bit presumptuous to assume that the user logged in from the X
  25. server?  In the case of X terminal users, this is extremely unlikely (they
  26. usually have telnet clients, but one normally logs in using XDM).  And if
  27. the user does recursive telnets, the DISPLAY won't be propogated correctly.
  28.  
  29. I've heard of people solving the problem by using rlogin, which propagates
  30. the TERM environment variable automatically.  They use a script that first
  31. concatenates the DISPLAY environment variable onto the TERM variable and
  32. then invokes rlogin.  The .login file on the destination then extracts the
  33. DISPLAY from the TERM variable.
  34. -- 
  35. Barry Margolin
  36. System Manager, Thinking Machines Corp.
  37.  
  38. barmar@think.com          {uunet,harvard}!think!barmar
  39.