Re: remote OpenGL over X11, ssh tunnels, and direct X11
Re: remote OpenGL over X11, ssh tunnels, and direct X11
- Subject: Re: remote OpenGL over X11, ssh tunnels, and direct X11
- From: Steven Langer <email@hidden>
- Date: Thu, 20 Jul 2006 16:27:52 -0700
Here is a bit more detail on the response Rich Cook supplied. It
might help you appreciate why direct X11 connections are faster. Our
computers only permit logins via ssh, so I will describe an ssh based
approach. telnet has allowed so many passwords to be stolen over the
years that I am quite happy that we don't use it here. I use xauth to
control X11 connections to my Mac (see below for why I don't like
xhost), so the direct X11 connections I use are reasonably secure.
Suppose I ssh from a computer called macpowerpc with X11 forwarding
enabled (either via "-X" or in the ssh config files) to a machine
called macintel. If I then type:
echo $DISPLAY
I will probably get something like "macintel:10.0" as the answer.
This DISPLAY variable tells any X11 apps I launch on macintel to
connect to the "proxy X11 server" that ssh launched on macintel. The
proxy X11 server will take all the commands it receives and hand them
to ssh on macintel. ssh encrypts the X11 packets and sends them to
ssh on macpowerpc. ssh on macpowerpc decrypts the packets and hands
them to the X11 server on macpowerpc.
Suppose I ssh to macintel and type:
setenv DISPLAY macpowerpc:0.0
Suppose that I also use xauth to authorize macintel to connect to the
X11 server on macpowerpc (I use a clever Python script written by one
of my coworkers to hide the details of xauth etc.). If I now start an
X11 program on macintel, it sends its X11 packets across the network
directly to the X11 server running on macpowerpc. This avoids hand
offs between ssh and X11 and the encryption and decryption of the X11
packets. X11 (and glx) performance is noticeably better with direct
X11 connections on a fast, low latency network. I have also run
programs between pairs of machines where the network characteristics
were such that there was no performance difference between direct and
tunneled connections.
Why don't I like xhost? If I type "xhost +" I permit anyone on a
computer that can send a packet to my Mac to steal every keystroke I
type in an X11 window. If I type "xhost +macintel", I allow anyone on
macintel to steal every keystroke I type. All X11 keystrokes on
macpowerpc can be stolen, not just the ones typed to programs running
on macintel.
Why did I bother to indicate whether I was using a direct connection
or an ssh tunnel? Because the error modes are subtly different when
the program talks to a proxy X11 server instead of directly to the
real X11 server.
Unless graphics performance is a bottleneck for your X11 programs, it
is best to do the simple thing and stick with X11 tunneling.
Steve Langer
Forgive my ignorance - what is a "direct X11 connection" as opposed
to "X11 tunneled through ssh" ? Do you mean telnet/xhost way of
running remote X apps ?
On Jul 20, 2006, at 5:02 PM, Steven Langer wrote:
I think there is a real bug here, but I am not quite sure what it is.
I built the OpenGL version of yorick on a 10.4 Intel Mac. This
program uses glx, so the OpenGL commands are passed through X11
whether I run locally or across the network.
When I run this version of yorick locally, the OpenGL code works
correctly and the performance is what I expect from an Intel iMac.
When I run the program remotely with a direct X11 connection back
to a 10.3 Mac G5, The GL window appears but I get the following
error message:
ERROR (light3d) Misaligned address interrupt (SIGBUS)
If I then create another GL window, I can display graphics in it,
but there are anomalies (e.g. a small fraction of the polygons in
the scene did not display).
When I connect to the remote Intel Mac with my X11 tunneled through
ssh and run yorick, it fails to create the 3D window.
When I run the program remotely with a direct X11 connection back
to a Fedora Core 4 Linux system (an x86_64 system), everything
works correctly.
When I sit in front of the Intel Mac and run the program through an
ssh X11 tunnel from a 10.3 PowerPC Mac, the program crashes with a
bus error as soon as it tries to create the OpenGL window.
When I sit in front of the Intel Mac and run the program through an
ssh X11 tunnel from the Linux PC, everything works OK.
When I run the program on a 10.4 G5 Mac and try to display back to
the Intel Mac, the program get a misaligned address interrupt.
There shouldn't be any problems sending X11 commands generated on a
processor of one type to an X11 server running on another type of
chip. I have done that for years with IBM, Sun, HP/Compaq/DEC, and
SGI workstations displaying back to a PowerPC Mac or to a Linux PC
(it even works displaying back to a Windows PC).
I don't know what Apple has done, but I don't see any problems
UNLESS the Intel Mac is involved.
Is this good enough to file a bug report with Apple, or will they
want additional information?
Steve Langer
------------------------------
Message: 10
Date: Thu, 20 Jul 2006 09:59:29 -0700
From: Richard Cook <email@hidden>
Subject: Re: remote opengl over x11
To: Sandhitsu Das <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Sorry, confused again! I'm multitasking. :-) I'll get it
straight soon. Your local machine is a PPC mac, the remote is
Intel mac. I can test that at home. But that's even weirder now.
What's happening is the clients on the Intel machine are calling
the GLX library on the Intel machine, which then talks GLX over
the network to the X server on the PPC, which then uses hardware
to render the GL calls that result. Your error (Bad Request)
comes from the X server and is interpreted and repeated by
glxgears to you. So something the client GLX libraries said is
making the PPC server unhappy.
I guess a good test would be what if the glxgears ran on Intel Mac
and the X server (localhost) was a linux box? That's one I'll
have trouble testing, but would be a natural next test.
On Jul 20, 2006, at 9:41 AM, Sandhitsu Das wrote:
Correct me if I'm wrong, but the X server in this case is
running on the local machine - PPC notebook - right ? Isn't it
the client X appllication that is running on the Intel mac ?
On Jul 20, 2006, at 12:33 PM, Richard Cook wrote:
Oh, when the REMOTE machine is intel... hmm, I'll look and see
if I can reproduce. I'm sorry I misunderstood. I don't know
why the Intel X server would not be able to use GLX, though,
that strikes me as very strange bug.
On Jul 20, 2006, at 9:24 AM, Sandhitsu Das wrote:
I am able to see glxgears as well when the remote machine is
linux. It doesn't work when the remote machine is an Intel
iMac. Yes, I'm sure I'm using -Y. My local machine is a
Powerbook G4.
On Jul 20, 2006, at 12:19 PM, Richard Cook wrote:
>>>
I am able to ssh to a linux machine from my Intel MacBook and
see glxgears over a tunneled -Y connection. it's not a bug,
it's something you're doing. Are you SURE you're using -Y?
On Jul 20, 2006, at 3:08 AM, Martin Costabel wrote:
Sandhitsu Das wrote:
Hi,
I can't seem to run opengl apps remotely using apple's X11.
Here is my setup:
Local machine: Powerbook G4 OS X 10.4
Remote machine: Intel iMac OS X 10.4
I'm using ssh -Y to log in remotely. glxgears and glxinfo
fails with the following message:
name of display: localhost:10.0
X Error of failed request: BadRequest (invalid request
code or no such operation)
Major opcode of failed request: 129 (Apple-DRI)
Minor opcode of failed request: 1 ()
Serial number of failed request: 13
Current serial number in output stream: 13
Other X apps like xterm, xclock etc. work fine.
Interestingly, with the same setup, if the remote machine
is a linux machine opengl apps work fine. I'm connecting
through a VPN - first I thought that could be the problem
but since it works with remote linux machines that couldn't
be.
It will work even with a remote OSX machine if it's a PPC.
This looks like an OSX/Intel bug.
Any ideas would be appreciated.
File a bug with Apple at http://bugreport.apple.com
--
Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://
This email sent to email@hidden
------------------------------
_______________________________________________
X11-users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/x11-users
End of X11-users Digest, Vol 3, Issue 122
*****************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden