RH, OpenSSH and X

Kevin Buettner plug-discuss@lists.PLUG.phoenix.az.us
Mon, 17 Sep 2001 16:05:55 -0700


On Sep 17,  2:32pm, der.hans wrote:

> I've got a RH 7.1 box ( basic out of the box install ). I'm trying to ssh to
> it, su to root, then open an X app back on my desktop.
> 
> Initial setup works fine. Then I move it to another network and my account
> can do X stuff, but root can't.

Try the following:

1) As yourself (i.e. prior to becoming root), do:

	echo $XAUTHORITY

   This'll display something like /tmp/ssh-XXRk1TWd/cookies.

2) After you become root, do:

	export XAUTHORITY=/tmp/ssh-XXRk1TWd/cookies

   Obviously, you'd change the thing on the RHS of the ``='' to the name
   of the cookie file obtained in step 1.

If anyone knows of a way to automagically set this up, please let
me know.   (Hmm... I guess an expect script could be used to set this
up...)

Kevin