Re: ssh and X11Forwarding
Lo, on Thursday, August 16, Svante Signell did write:
> When ssh-ing to a computer in my small LAN as a normal user and using
> X applications, such as emacs, everything works OK. Howver, with su to
> root on the remote box X is refused: Connection lost to X server`host:11.0'
Let me make sure I understand you. Initially, when you establish the ssh
session, you're running as a normal (non-root) user on both the local and
remote systems, right? Then, you try to `su' on the remote system, and
applications started within *that* shell don't work?
If that's the case, then the solutions is pretty easy, although it's not
the sort of thing you'd likely stumble across. On the remote host, just
before you su, print the contents of the $XAUTHORITY environment variable.
It'll probably look something like /tmp/sshXXXXXXX/cookie. Then, after you
su, run the command
xauth merge /tmp/sshXXXXXXX/cookie
where the argument is the value of XAUTHORITY you got earlier.
Then try running your X clients.