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

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