Q: standard method of tracking location of X-server?

Q: standard method of tracking location of X-server?

Post by Nan-shan Ch » Sun, 22 May 1994 10:29:37



Hi there,

I am setting my "DISPLAY" variable through some tricks.  But I'd
like to do it in a standard way.  Is there any?

I had to define a variable that keeps track of the location of
the X-server and to alias "rlogin" to a script which manipulate
the variable "TERM" prior to calling the real "rlogin" in order
to pass the location of the X-server over to the remote.  
The login-shell together with its rc-file has therefore to
understand the special meaning of the "TERM" it becomes.

Although I am able to rlogin all around the stations and still
have the DISPLAY correctly set, I am not feeling very well. :(

--
|------------------------------------------------------------------------|
  Nan-shan Chen                    Vogeliusweg 19.4.0.3, 33100 Paderborn


|------------------------------------------------------------------------|

 
 
 

Q: standard method of tracking location of X-server?

Post by S » Mon, 23 May 1994 07:15:52



Quote:>I am setting my "DISPLAY" variable through some tricks.  But I'd
>like to do it in a standard way.  Is there any?

        How about having somthing like this in Ur login file.
         setenv DISPLAY "`who am i | sed 's/.*(\(.*\))/\1/'`:0.0"
        U might want to make it a bit more fancier.

        SD.

 
 
 

Q: standard method of tracking location of X-server?

Post by Kari E. Hurt » Tue, 24 May 1994 00:54:37



?>I am setting my "DISPLAY" variable through some tricks.  But I'd
?>like to do it in a standard way.  Is there any?

?      How about having somthing like this in Ur login file.
?       setenv DISPLAY "`who am i | sed 's/.*(\(.*\))/\1/'`:0.0"
?      U might want to make it a bit more fancier.

I'm using:
xauth nlist $DISPLAY | rexec -bg $1 "xauth nmerge - && xterm -ls +ut -display $DISPLAY -fn -adobe-courier-medium-r-normal--18-\*-iso8859-1 -n $name -title \"xterm: $name\""

where 'rexec' is quite simple wrapper around rexec -library function, -bg
tells that wrapper that go background after the rexec -function call.

Or if you can user rsh -protocoll replace rexec with rsh -command.

Like a idea?
--
- Kari E. Hurtta                             /  El?m? on monimutkaista

 
 
 

Q: standard method of tracking location of X-server?

Post by Donn Ca » Wed, 25 May 1994 02:43:11


| I am setting my "DISPLAY" variable through some tricks.  But I'd
| like to do it in a standard way.  Is there any?
|
| I had to define a variable that keeps track of the location of
| the X-server and to alias "rlogin" to a script which manipulate
| the variable "TERM" prior to calling the real "rlogin" in order
| to pass the location of the X-server over to the remote.  
| The login-shell together with its rc-file has therefore to
| understand the special meaning of the "TERM" it becomes.
|
| Although I am able to rlogin all around the stations and still
| have the DISPLAY correctly set, I am not feeling very well. :(

Notwithstanding, it's the best that can be done with tricks.  The
`who am i` tricks don't work unless you have logged in directly from
your server machine, obviously.  (Not always an option with X terminals.)

The only standard way I know of is a telnet option, XDISPLOC or something
like that.  Some telnetd and telnet implementations support this - DEC's
OSF/1 telnetd & telnet, and NCD's builtin telnet, for example.  Mention it
to your vendor.  If this option is working on both ends of the connection,
you'll find that DISPLAY is already set when you log in.  

If you're going to hack telnetd to do this, probably also have to hack
/bin/login to check for DISPLAY.

        Donn Cave, University Computing Services, University of Washington

 
 
 

Q: standard method of tracking location of X-server?

Post by Nan-shan Ch » Thu, 26 May 1994 00:04:33


I thank you all for the follow-up. :)

--
|------------------------------------------------------------------------|
  Nan-shan Chen                    Vogeliusweg 19.4.0.3, 33100 Paderborn


|------------------------------------------------------------------------|