home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: graaff@duticai.twi.tudelft.nl (Hans de Graaff)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: setting DISPLAY env variable
- Message-ID: <1992Dec21.192644.7363@sm.sony.co.jp>
- Date: 21 Dec 92 19:26:44 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Delft University of Technology
- Lines: 35
- Approved: michael@sm.sony.co.jp
-
- Date: 21 Dec 92 13:33:33 GMT
- Message-Id: <BzM2zx.J7M@dutiws.twi.tudelft.nl>
- Newsgroups: comp.windows.x
- References: <1h4bp2INNi8u@sol.deakin.OZ.AU>
- Sender: xpert-request@expo.lcs.mit.edu
-
- In article 1h4bp2INNi8u@sol.deakin.OZ.AU, rns@deakin.OZ.AU (Robert Sturrock) writes:
- >I don't think this solves the problem. My difficulty is not starting
- >up an xterm. My problem is logging into a remote machine and having the
- >DISPLAY variable appropriately set on this machine to "wkstn:0.0".
-
- I got this from the net some time ago, and I've used it for some time now.
- I use this in my .login
-
- --
-
- # make it so that the DISPLAY points to the machine I'm sitting at...
- set callerid=`who am i | sed -e 's/^.*(//' -e 's/)$//' -e 's/\.[-a-zA-Z]*$//' `
-
- # callerid is either the current display (:0.0), or the host (foo.bar)
- set test = `echo $callerid | sed -e 's/^.*:.*//'`
-
- if ($#test == 1) then
- setenv DISPLAY $callerid\:0.0
- else
- setenv DISPLAY `hostname`:0.0
- endif
-
- unset test
- ---
- Hans de Graaff | I want someone to follow,
- J.J.deGraaff@IS.TWI.TUDelft.NL | who doesn't lead the way
- Department of Informatics | I want someone to listen,
- Delft University of Technology | who won't repeat what I say
- Room: 2.003, Telephone: +31-15-78-5811
-