Thomas, if the DISPLAY variable is incorrect set you now get the Error in <TGClient::TGClient>: can't open display "bla:0.0", bombing... message. Do I understand you want to switch to batch mode in case the system could not connect to the X server? Cheers, Fons. On Tue, 2003-10-21 at 14:24, Thomas Bretz wrote: > Hi, > > I found out, that if the DISPLAY variable is not correctly set my > application crashes. Searching for the reason I realized, that in the > main function gROOT is already set. From the constructor of the TROOT I > learned, that Batch-mode is enabled if DISPLAY is not set. So I > instantiate a TGApplication object afterwards, which sets the DISPLAY > variable in case it is not yet set (calling gSystem->SetDisplay) before > instantiating a TGClient object. Wouldn't it be a good idea to reset the > batch mode in the case setting the display was successfull? Otherwise I > have to reset it manually... > > Best regards, > Thomas. -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://www.rademakers.org/fons/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET