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

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!edcastle!kenny
  2. From: kenny@castle.ed.ac.uk (K J MacDonald)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: setting DISPLAY env variable
  5. Message-ID: <29777@castle.ed.ac.uk>
  6. Date: 21 Dec 92 16:47:18 GMT
  7. References: <1h4bp2INNi8u@sol.deakin.OZ.AU> <BzM3Az.2FG@gabriel.keele.ac.uk>
  8. Organization: Edinburgh University
  9. Lines: 30
  10.  
  11. I always run on a different X Terminal each time I log on (to several
  12. different machines around the campus) and I've got a quick and dirty way
  13. of setting my DISPLAY env. variable.
  14.  
  15. On each machine that I log into I place the following line into my
  16. .bashrc (or .cshrc or  whatever) file.
  17.  
  18.     export DISPLAY=`cat $HOME/etc/display`
  19.  
  20. And on each machine that has a .xsession file I add the following lines
  21. to the .xsession file.
  22.  
  23.     rsh <remote_machine> "echo $DISPLAY > etc/display"
  24.     rsh <another_mathine> "echo $DISPLAY > etc/display"
  25.  
  26. and so on.
  27.  
  28. Now when my .xsession is run, my DISPLAY variable is written into a file
  29. on each of the machines I have accounts on. This is then read when I log
  30. on to the other machine. 
  31.  
  32. Simple, eh ?
  33.  
  34.         Kenny.
  35.  
  36. -----------------------------------------------------------
  37. Kenneth MacDonald        E-mail kenny@festival.ed.ac.uk
  38. Dept. of Geology & Geophysics
  39. University of Edinburgh        Scotland
  40. -----------------------------------------------------------
  41.