DISPLAY variable automatic set-up

DISPLAY variable automatic set-up

Post by Laurent Aymeri » Wed, 04 Sep 1996 04:00:00



Hi,

Has anybody thought about an automatic DISPLAY variable set-up when
"travelling" on a local area network (rlogin from station to station)

Thanks to you.
--

                                     |"|  
                                    _|_|_
                                    (o o)
                                ooO--(_)--Ooo
========================================================================
         Laurent AYMERIC              |     MOTOROLA Semiconducteur S.A.
                                      |     Av. General Eisenhower      
       System Administrator           |     BP 1029    
    AICD Toulouse Design Center       |     31023 TOULOUSE CEDEX
                                      |
         Email address :              |     Tel   : (FRANCE) 61 19 10 08

========================================================================
                                   |    |
                                   |    |
                                  ooO  Ooo

 
 
 

DISPLAY variable automatic set-up

Post by Ling Wan » Thu, 05 Sep 1996 04:00:00



> Hi,

> Has anybody thought about an automatic DISPLAY variable set-up when
> "travelling" on a local area network (rlogin from station to station)

Probably every got their own implementation already.
If you still don't know.  Here is a EZ one.
add to .cshrc (for csh)
  if ( ! $?DISPLAY ) then
    setenv DISPLAY `who am i | cut -f2 -d\( | cut -f1 -d\)`:0
  endif
You could use whatever: finger, last, netstat.
This is only for a 1 hop stop.  rlogins to rlogins would
require some more complicated scheme which could be,
rsh to machine rlogin from and see where you are rlogined
from, and rsh to that machine to do the same, until
you reach the host where it is not rlogined from. Which
is probably not worth the effort.

 
 
 

DISPLAY variable automatic set-up

Post by s.. » Thu, 05 Sep 1996 04:00:00



> Has anybody thought about an automatic DISPLAY variable set-up when
> "travelling" on a local area network (rlogin from station to station)

You might want to look into ssh (scp, slogin) which is a drop in
replacement for the various r* utilities. It automatically sets the
DISPLAY variable and encrypts all traffic between the machines in
question (including the X client traffic).  You will need to have root
to most effectively configure ssh, but it is possible to set it up per
user.

The ssh home page is at http://www.cs.hut.fi/ssh/.

Emil

 
 
 

DISPLAY variable automatic set-up

Post by Mario Klebs » Tue, 10 Sep 1996 04:00:00




>> Hi,

>> Has anybody thought about an automatic DISPLAY variable set-up when
>> "travelling" on a local area network (rlogin from station to station)
>Probably every got their own implementation already.
>If you still don't know.  Here is a EZ one.
>add to .cshrc (for csh)
>  if ( ! $?DISPLAY ) then
>    setenv DISPLAY `who am i | cut -f2 -d\( | cut -f1 -d\)`:0
>  endif
>You could use whatever: finger, last, netstat.
>This is only for a 1 hop stop.  rlogins to rlogins would
>require some more complicated scheme which could be,
>rsh to machine rlogin from and see where you are rlogined
>from, and rsh to that machine to do the same, until
>you reach the host where it is not rlogined from.

This will not work, if you login from a Machine with multiple displays
or with X-terms. I solved the problem by piggybacking DISPLAY into
TERM, which gets propagated by rlogin. A different aproach is to use
ssl.

73, Mario
--

Institut fuer Robotik und Prozessinformatik der TU Braunschweig
Hamburger Strasse 267, 38114 Braunschweig, Germany

 
 
 

DISPLAY variable automatic set-up

Post by David Ledg » Thu, 12 Sep 1996 04:00:00





> >> Hi,

> >> Has anybody thought about an automatic DISPLAY variable set-up when
> >> "travelling" on a local area network (rlogin from station to station)

> >Probably every got their own implementation already.
> >If you still don't know.  Here is a EZ one.
> >add to .cshrc (for csh)
> >  if ( ! $?DISPLAY ) then
> >    setenv DISPLAY `who am i | cut -f2 -d\( | cut -f1 -d\)`:0
> >  endif
> >You could use whatever: finger, last, netstat.
> >This is only for a 1 hop stop.  rlogins to rlogins would
> >require some more complicated scheme which could be,
> >rsh to machine rlogin from and see where you are rlogined
> >from, and rsh to that machine to do the same, until
> >you reach the host where it is not rlogined from.

I use script that uses awk to examine the o/p of a ps.  It starts at the
current PID and runs up the PPID - PID chain until it reaches one that
shows the display. This is usually the child of inetd that spawned the
chain.

David