[CentOS] ssh x11 forwarding problem

Fri Feb 17 15:10:10 UTC 2006
Marko A. Jennings <markobiz at bluegargoyle.com>

On Fri, February 17, 2006 10:02 am, Tony Schreiner said:
> I'm running into an a problem with x11 forwarding over ssh
>
> I'm trying to run an application (rasmol -  molecule viewing program)
> which when using the the default setup for x11 forwarding causes the
> following error:
>
> X Error of failed request:  BadAccess (attempt to access private
> resource denied)
>    Major opcode of failed request:  132 (MIT-SHM)
>    Minor opcode of failed request:  1 (X_ShmAttach)
>    Serial number of failed request:  230
>    Current serial number in output stream:  231
>
>
> It used to be possible to overcome this by setting
>
> X11UseLocalhost  no
>
> in /etc/ssh/sshd_config
>
> This worked in CentOS 3 but does not in CentOS 4 (or Fedora 4 for
> that matter), and I'm guessing it is a XFree86 vs. Xorg issue.
>
> Now, when using
> X11UseLocalhost no
>
> no X applications work
>
> ssh myserver
> # echo $DISPLAY
> myserver.fqdn:10.0
> # xdpyinfo
> xdpyinfo:  unable to open display "myserver.fqdn:10.0".
>
>
> I have X11 forwarding set up on the client side by default.
>
> on the other hand if I don't use tunneling, but set  DISPLAY=myclient:
> 0 and xhost +myserver on the client
> then the application works.
>
> I prefer to use tunneling if possible.
>
> Thoughts about why X11UseLocalhost doesn't work?
> Tony Schreiner

I believe setting ForwardX11Trusted to "yes" (or using -Y command line
option) will do the trick for you.

Marko