X forwarding an ssh connection with sudo
Matthew C Valites
mvalites at banta-im.com
Thu Oct 10 15:02:41 EDT 2002
I'm trying to sudo a command that runs an X app through an ssh
connection between a linux machine and a solaris box. The problem I'm
having is that the X forwarding doesn't allow a window to be thrown back
when you're changing uid's. I believe that when I use sudo (or su) it
loses control of the pipe that would normally have the app sent back
through.
X forwarding is configured in my sshd_config and works perfectly for any
app that I would run normally logged in as either root or any other
user. The problem exists only when I try to remotley run a program as a
user other than what I logged into the machine as.
I think that the problem lies in xauth and the DISPLAY env variable.
Somehow I need to set DISPLAY in sudo as is it is when I first logged
in. Has anybody had any similar problems and have any workarounds?
I have to sudo the command, so sudo'ing a shell or changing the
permissions so the user can execute it on the remote machine is not a
valid solution. Any help or suggestions are appreciated.
Thanks,
~Matt
More information about the Discuss
mailing list