From: anthony@kurango.cit.gu.edu.au (Anthony Thyssen)
Newsgroups: fj.mail-lists.x-window
Subject: Re: setting DISPLAY env variable
Date: 22 Dec 92 05:41:49 GMT
Distribution: fj
Organization: Griffith University.

Date: Tue, 22 Dec 1992 03:20:51 GMT
Message-Id: <Bzn5As.56y@kurango.cit.gu.edu.au>
Newsgroups: comp.windows.x

An extract from my info files....

------------------------------------------------------------------------------
Methods to automatically passwd Authorization from one machine to another.
  This also includes the problem of notifing the remote host of the current
DISPLAY that is being used.

1/ Use rsh/rexec  (the method in the xauth manual)
      Set up the your .rhosts file in the home directory on the remote
  machine so that a password in not required to remotly execute commands.

         xauth extract - $DISPLAY | rsh other xauth merge -

  This method is also used by xrsh to pass authorization. My vampire
  program also uses a variation, however I wrap it as part of the remote
  command sequence  (EG:  xauth add $auth)

     Included in this method is the use of `xrlogin' and `xrsh' to do
  this job for you. These programs usally (the newer ones that is) allow
  you to pass a secified list of ENVIRONMENT variables which includes
  the `DISPLAY' and/or a copy of the authorization code required.

2/ Wrap it as part of the TERM environment variable.
      This method uses the fact that most remote command executors do pass
  the TERM environment variable to the remote host. It is then a matter of
  an appropiate script in your remote .login file to extract the information
  from the TERM environment variable and set up things appropiatly.

3/ NFS.
     Write it to a file on a shared NFS partition you have access to.
   Note that if the home directories are NFS mounted, then authorization
   is automatically passed, Hoever you will still have to pass your
   DISPLAY environment variable via a file.  IE:

      login host:       echo $DISPLAY > ~/.X11host
      remote host:      setenv DISPLAY `cat ~/.X11host`

4/ Finger for the info in a .plan file
      This involves encrypting the information into your `plan' or
  `project' and having the remote machine finger for the information.
  This has the disadvantage of having the information to anyone fingering
  the user.  Thus requiring a encryption method that is uniq to each
  individual.  IE: the method of decyrption must not be shared or knowen
  by others, nor should it be easy to determine.

    A improvment is to use the `who fingered me' technique to only give
  the information only to your own remote accounts and not just to anyone
  who is asking.

------------------------------------------------------------------------------


  Anthony Thyssen - (SysProg @ Griffith University)     anthony@cit.gu.edu.au
------------------------------------------------------------------------------
   Like all bee keepers, Death wore a veil. It wasn't that he had anything
   to sting, but sometimes a bee would get inside his skull and buzz
   around, giving him a headache.          --- Terry Pratchet - "Eric"
------------------------------------------------------------------------------