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

  1. Path: sparky!uunet!pipex!warwick!uknet!axion!sol!news
  2. From: dharding@pollux.lssec.bt.co.uk (Derek Harding)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: setting DISPLAY env variable
  5. Message-ID: <1992Dec21.085729.22936@lssec.bt.co.uk>
  6. Date: 21 Dec 92 08:57:29 GMT
  7. References: <1gmgnoINN4bu@sol.deakin.OZ.AU> <1go0ivINN93@gap.caltech.edu>
  8. Sender: dharding@pollux (Derek Harding)
  9. Organization: BT D&P London
  10. Lines: 53
  11.  
  12. In article <1go0ivINN93@gap.caltech.edu>, lindheim@hagar.ccsf (Jan Lindheim) writes:
  13. |> In article 1gmgnoINN4bu@sol.deakin.OZ.AU, rns@deakin.OZ.AU (Robert Sturrock) writes:
  14. |> >Hello,
  15. |> >
  16. |> >is there a way to set the DISPLAY variable to be the particular workstation
  17. |> >you are using inside ".bashrc".  That is, I want every new xterm, for
  18. |> >whatever host I happen to be logging into, to have DISPLAY set to my
  19. |> >workstation.  Note that my workstation will vary, so I can't just
  20. |> >hardwire
  21. |> >
  22. |> >    export DISPLAY=workstation:0.0
  23. |> >
  24. |> >inside my .bashrc file.
  25. |> >
  26. |> >Thanks
  27. |> >
  28. |> >
  29. |> >Rob
  30. |> 
  31. |> You can put something like:
  32. |> 
  33. |> if ("`tty`" == "/dev/console") then
  34. |>     echo `hostname`:0 > $HOME/.x11host
  35. |> else
  36. |>     set X11HOST = (`cat $HOME/.x11host`)
  37. |>     setenv DISPLAY $X11HOST
  38. |> endif
  39. |> 
  40. I use the following command in my .twmrc (I use ksh) to run framemaker remotely. This
  41. works from any workstation since it uses the 'hostname' command to workout what machine
  42. I am on.
  43.  
  44. Menu "Tools"
  45. {
  46.     "Remote Frame (xxx) ..."  ! "rsh xxx \"DISPLAY=`hostname`:0;export DISPLAY;\
  47.                                  /tools/framemaker/bin/imaker\" &"
  48.     .
  49.     .
  50.     .
  51. }
  52.  
  53. Derek
  54. -- 
  55.  
  56. +------------------------------------+----------------------------------------+
  57. | Derek Harding                      |                                        |
  58. | London Engineering Centre, BT Labs |      OpenWindows should be thrown      |
  59. | PP 6/3, Room 616 151 Gower Street  |             out of one !               |
  60. | London WC1E 6BA                    |                                        |
  61. |                                    | Joke of the week:                      |
  62. | Tel: 071-728-7861                  |     We don't follow standards, we set  |
  63. | Email: dharding@lssec.bt.co.uk     |     them - Sun Microsystems            |
  64. +------------------------------------+----------------------------------------+
  65.