Re: xhost

From: John Meyers (
Date: 05/30/02

Date: Thu, 30 May 2002 08:33:09 -0400
From: John Meyers <>
To: "Small, Jim" <>

 Jim, an ssh implementation would definitely be the prefered way to go.
 At that point, the admins shouldn't have to mess around with the DISPLAY
 variable or xauth, as it's configured for you automatically when you have
 X11 forwarding enabled.

 Although occassionally I've run into some applications that don't work
 exactly right (mostly Java based apps) when being tunnelled through an
 ssh session. For those occassions, I've setup a small script that
 basically copies the local xauthority keys to a remote host. It looks
 like this,

    #! /bin/sh
    LHOST=`uname -n`
    /usr/openwin/bin/xauth extract - $LHOST:0.0 | ssh $SHOST \
        '/usr/openwin/bin/xauth merge -'

 I have this in a script called 'xsauth'. Note this assumes you have ssh
 installed. If ssh isn't an option for some reason, just substitute 'rsh'
 for 'ssh' in the script. So if you were to perform some work on a remote
 host, you would first transfer over your current xauthority keys,

        xsauth remote-hostname
        Password: ...

 Then login into the remote host and set your DISPLAY back to your local
 host display.

 Hope this helps.


 John Meyers
 Computing Services
 Wright State University