[ale] I'd like to be able to run X programs from root

LinuxGnome lnxgnome at gmail.com
Mon Jan 30 20:24:55 EST 2012


On 01/30/2012 07:43 PM, Jim Lynch wrote:
>   I can  ssh -Y  to a remote Ubuntu system,  sudo -s, perform some 
> commands including running X programs like gvim.  It also used to work 
> in Centos 5, however with Centos 6 and Fedora 14 it complains.
> 
> E233: cannot open displayX11 connection rejected because of wrong 
> authentication
> 
> echo $DISPLAY tells me the variable is set OK.
> localhost:10.0
> 
>    I'm logging in via ssh from a Ubuntu system to Fedora (for 
> instance).  As a normal user I can display X programs fine, but when I 
> sudo it doesn't work.
> 
> My Centos 5 system does but my Centos 6 and Fedora systems don't.
> 
> I'm sure it's some sort of security restriction but is there a way to 
> make it work?
> 
> Google wasn't much help or I didn't know how to phrase the question.  
> Wonder if Evi would help?
> 

If this is across your LAN and lack of security/encryption isn't an issue, then just don't tunnel through ssh.
1 On your desktop, run xhost +
2 Don't use -X or -Y with ssh
3 On the remote host, export DISPLAY=desktop-hostname-or-IP:0
4 Run your X app on the remote host in the same session you exported the DISPLAY variable.


More information about the Ale mailing list