RH, OpenSSH and X

der.hans plug-discuss@lists.PLUG.phoenix.az.us
Wed, 19 Sep 2001 02:23:00 -0700 (MST)


Am 17. Sep, 2001 schwätzte Kevin Buettner so:

> 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...)

Actually, it happens automagically because suing without the dash shouldn't
change the $XAUTHORITY.

lufthans:~$ echo $XAUTHORITY
/tmp/ssh-XX6CVip2/cookies
lufthans:~$ su
Password: 
/home/lufthans# echo $XAUTHORITY
/tmp/ssh-XX6CVip2/cookies
/home/lufthans# 

This is a debian box at home, not the box with the prob. I checked
XAUTHORITY there. It was either the same or not set in both cases. It's now
the same as it was, but works.

It seems that the problem was due to a domain expiring, but the primary
server for it being the first server in resolv.conf. Changing the domain
fixed it. I don't like that answer. If it's broken, it should be broken for
everybody, dammit, not just root :). Unfortunately, I don't have time to
dedicate to testing it properly. Maybe later when I need a break from the
rest of the project.

danke,

der.hans
-- 
# der.hans@LuftHans.com home.pages.de/~lufthans/ www.DevelopOnline.com
#  HERE LIES LESTER MOORE
#  SHOT 4 TIMES WITH A .44
#  NO LES
#  NO MOORE
#        -- tombstone, in Tombstone, AZ