[vtkusers] Re: Offscreen Rendering

Miguel Angel Martin Fernandez vtk at helios.tel.uva.es
Wed Oct 3 11:27:36 EDT 2001


Hello vtkusers!


The script "run.sh" does work if i am actually running the program via
telnet, as long as i have 'XOpenDisplay((char *)NULL)' in my
vtkOpenGLOffscreenRenderWindow, that way XOpenDisplay defaults to the
value of the DISPLAY environment variable (--> i read the man page!! )

However what i am actually trying to do is parallel rendering on a
linux cluster with mpi, so programs are called via rsh, and with this
approach the script doesn't seem to work. However it did work by telling
XOpenDisplay exactly what display i wanted: 

		  'XOpenDisplay("<name_of_R>:0.0")'


I'll try to improve this little patch and make it a bit more robust, that
shouldn't be hard because it probably can't get any less robust right? :-)

Thank you!!!



On Wed, 3 Oct 2001, Randy Heiland wrote:

> 
> It's *running* your pgm remotely that's the problem, not *compiling* remotely.
> 
> Try the following things:
> 
> where:
> R=remote computer you're telneted in from
> H=host computer running the pgm
> 
> 1) from R do a 'xhost +<name of H>', e.g., 'xhost +marvin',
>     then try to run
> 
> if that still fails:
> 2) from H, insert your pgm into a script which exports the DISPLAY env var,
> e.g.
> 
> run.sh:
> -------
> DISPLAY=:0.0
> export DISPLAY
> dispPgm
> 
> then execute 'run.sh'
> 
> if that still fails:
> 3)  change the line in the code to be this:
> 
>       this->DisplayId = XOpenDisplay((char *)NULL);
> 
> recompile the class, your pgm, and iterate on 1) and 2) til you're exhausted :)
> 
> Oh yeah, also do a 'man XOpenDisplay' and read it.
> 
> good luck,
> --Randy
> 
> 
> On Oct 3, 11:45am, Miguel Angel Martin Fernandez wrote:
> > Subject: [vtkusers] Re: Offscreen Rendering
> > Hi vtkusers!
> >
> > I am having a problem with vtkOpenGLOffscreenRenderWindow, sometimes when
> > I compile (on a remote host using telnet) a program that uses it, i get
> > the following error as i try to run my program:
> >
> >
> > Xlib: connection to ":0.0" refused by server Xlib: Invalid
> > MIT-MAGIC-COOKIE-1 key
> >
> > ERROR: In vtkOpenGLOffscreenRenderWindow.cxx, line 683
> > vtkOpenGLOffscreenRenderWindow (0x807f478): bad X server connection.
> >
> > p1_27512:  p4_error: interrupt SIGSEGV: 11 rm_l_1_27513:  p4_error:
> > interrupt SIGINT: 2 p0_22175: (2.142237) Trying to receive a message when
> > there are no connections; Bailing out
> >
> >
> > The cxx code line involved in this error is:
> >
> >   if (!this->DisplayId) {
> >     this->DisplayId = XOpenDisplay(":0");
> >     if (this->DisplayId == NULL) {
> >       vtkErrorMacro(<< "bad X server connection.\n");
> >     }
> >
> >
> >
> > However, if I compile the program while I am fisically in front of the
> > computer (not using telnet) then everything works OK, and  i don't get any
> > erorrs even if i then run it using telnet.
> >
> > Maybe when I am actually sitting by the computer, then this->DisplayId
> > does exist, and therefore it doesn't enter that "if"??
> >
> > Any ideas on how to fix this without having to run around the lab will be
> > definitely welcome!!!
> >
> >
> > Thank you very much in advance
> >
> >
> > 			Diego Hernando
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> >-- End of excerpt from Miguel Angel Martin Fernandez
> 
> 

-- 
            ________________________________________________________
  _________(_                                                      _)_________
  \········(_   Miguel Ángel Martín Fernández                      _)········/
   \·······(_   ETSI Telecomunicación, Universidad de Valladolid   _)·······/
    \······(_   Campus Miguel Delibes, Camino del Cementerio, s/n  _)······/
     )·····(_   e-mail: miguel at atenea.tel.uva.es                   _)·····(
    /······(_   Tfno: +34-983-423000 Ext. 25548                    _)······\
   /·······(________________________________________________________)·······\
  /__________)                                                 (_____________\
                                                        




More information about the vtkusers mailing list