home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!mcsun!sun4nl!dutrun!dutiws!dutigb!graaff
- From: graaff@IS.TWI.TUDelft.NL (Hans de Graaff)
- Subject: Re: setting DISPLAY env variable
- Message-ID: <BzM2zx.J7M@dutiws.twi.tudelft.nl>
- Sender: news@dutiws.twi.tudelft.nl (news en nntp)
- Reply-To: graaff@IS.TWI.TUDelft.NL
- Organization: Delft University of Technology
- References: <1h4bp2INNi8u@sol.deakin.OZ.AU>
- Date: Mon, 21 Dec 1992 13:33:33 GMT
- Lines: 30
-
- 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
-
-