[vtkusers] connection to ":0.0" refused by server (fwd)

Tom G. Smith (Smitty) smitty at kcc.com
Fri Oct 25 10:20:43 EDT 2002


Hello John and vtkusers,

Here's a cut-and-paste of two commands, and I've interjected some
comments, preceded by a # (I've also replaced the real hostnames
because our security department scans list servers for any mention
of my company, and threatens us with dismemberment if they see any
internal hostnames in our emails :-):

...............................................
bash-2.04$ hostname
thishost
bash-2.04$ ssh myhost /usr/X11R6/bin/xclock

# I did Ctrl-C to stop xclock, which displayed fine.

Received signal 2. (no core)
bash-2.04$ ssh myhost TCLLIBPATH=/contrib/vtk/VTK/Wrapping/Tcl \
> vtk /contrib/vtk/VTK/Examples/Modelling/Tcl/hello.tcl
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

# I got the "Hello" graphic on my display, and could zoom,
# rotate, etc.  I pressed q to exit.

bash-2.04$
...............................................

I also tried it directly on the console, where it works perfectly (and
on a Compaq Evo W8000 with an nvidia quadro2 graphics card really
zings! :-).  But if n people use this machine, n-1 won't be at the
console, so I need to resolve the problem.  Here's from the ssh
man page, if it'll help understand the environment we have:

  Excerpt from "man ssh":
  If the user is using X11 (the DISPLAY environment variable
  is set), the connection to the X11  display  is  automati­
  cally  forwarded to the remote side in such a way that any
  X11 programs started from the shell (or command)  will  go
  through  the  encrypted channel, and the connection to the
  real X server will be made from the  local  machine.   The
  user  should  not manually set DISPLAY.  Forwarding of X11
  connections can be configured on the command  line  or  in
  configuration files.

  The  DISPLAY  value  set  by ssh2 will point to the server
  machine, but with a  display  number  greater  than  zero.
  This is normal, and happens because ssh2 creates a "proxy"
  X server on the server machine for forwarding

---------- Forwarded message ----------
Date: Thu, 24 Oct 2002 16:33:25 -0700
From: John Balster <john.balster at engineering.ucsb.edu>
To: "Tom G. Smith (Smitty)" <smitty at kcc.com>
Subject: Re: [vtkusers] connection to ":0.0" refused by server

Sorry about that.  I must have overlooked that last paragraph.

Is the computer you are trying to display on called myhost?  The
DISPLAY variable needs to have the name of the computer you are
trying to open the window on.  In other words, if this is the same
machine as you appear to have sent your mail message from, the DISPLAY
variable should have "random:11.0" rather than "myhost:11.0".

What I'm thinking here is if Xlib can't resolve the "myhost", it
may be defaulting to using ":0.0" in place of the DISPLAY variable
contents it can't resolve.

John

At 2:08 PM -0500 10/24/02, Tom G. Smith (Smitty) wrote:
>As I said in my original post (see below) I have no trouble running
>any other X client in this environment.  I'd already tried
>"xhost +myhost" but as a last resort; I wouldn't have expected it to
>make any difference.  My display is -
>
>   bash-2.05a$ echo $DISPLAY
>   myhost:11.0
>
>*not* ":0.0".  Perhaps the real question should be, why is vtk partially
>ignoring my $DISPLAY value?  Ssh is listening on port 11 on myhost.
>It captures all of the X Client output, sending it back to my real
>host in its own encrypted tunnel.
>BTW, I tried this -
>
>   export TCLLIBPATH=/contrib/vtk/VTK/Wrapping/Tcl
>   vtk -display $DISPLAY \
>   /contrib/vtk/VTK/Examples/Modelling/Tcl/hello.tcl
>
>which gives me a grey-filled window labeled "vtk," no "Hello" graphic,
>no interaction, nada, and the only way I've found to get rid of it
>is to press Ctrl-C.  If I leave off the -display -
>
>   export TCLLIBPATH=/contrib/vtk/VTK/Wrapping/Tcl
>   vtk /contrib/vtk/VTK/Examples/Modelling/Tcl/hello.tcl
>
>I get the "Hello" graphic, and I can interact with it, rotating,
>zooming, etc, just like I can with VTK 3.2.  But I get this message
>at startup (Note that :0.0 is *NOT* my $DISPLAY value) -
>
>   Xlib: connection to ":0.0" refused by server
>   Xlib: No protocol specified
>
>and when I press "q" to exit, I get a segmentation fault.
>
>On Thu, 24 Oct 2002, John Balster wrote:
>>  >I get the "Hello" graphic, and I can interact with it (rotate, zoom, etc.).
>>  >But I also get this error:
>>  >
>>  >   Xlib: connection to ":0.0" refused by server
>>  >   Xlib: No protocol specified
>>
>>  Did you execute an xhost command on the computer you are trying to open
>>  the display on to tell it to allow windows to be opened?  This has to be
>>  done even if it's on the same machine that's running VtK.  For instance,
>>  if your machine is called kcc, you would use "xhost + kcc" to tell it to
>>  allow windows from kcc.  From a security point of view, I don't recommend
>>  using "xhost +" as that would open up windows creation to any computer in
>>  the world.
>>
>>  John
>
>Original post to vtkusers at public.kitware.com:
>>From smitty at random.kcc.com Thu Oct 24 12:09:29 2002
>Date: Thu, 24 Oct 2002 12:08:23 -0500 (CDT)
>From: "Tom G. Smith (Smitty)" <smitty at random.kcc.com>
>To: vtk mailing list <vtkusers at public.kitware.com>
>Cc: Chris Pieper <Chris.Pieper at kcc.com>
>Subject: connection to ":0.0" refused by server
>
>Hello vtkusers at public.kitware.com,
>
>I got past the initial error (GLX missing, see attached (BTW the
>responses from vtkusers were underwhelming :-)) by upgrading to Exceed
>3D 7.1, but now when I do -
>
>   export TCLLIBPATH=/contrib/vtk/VTK/Wrapping/Tcl
>   vtk /contrib/vtk/VTK/Examples/Modelling/Tcl/hello.tcl
>
>I get the "Hello" graphic, and I can interact with it (rotate, zoom, etc.).
>But I also get this error:
>
>   Xlib: connection to ":0.0" refused by server
>   Xlib: No protocol specified
>
>and when I press "q" to quit, I get a segmentation fault.  I'm running
>this remotely via ssh, and my $DISPLAY is set to -
>
>   bash-2.05a$ echo $DISPLAY
>   myhost:11.0
>
>I have no trouble running other X Clients (xterm, xclock, xeyes, MATLAB, etc.)
>so I don't believe it's my X Configuration causing this.


------------------------------------------------------------------------------
This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law.  If you have received this message in error, please inform us promptly by reply e-mail, then delete the e-mail and destroy any printed copy.   Thank you.

==============================================================================



More information about the vtkusers mailing list