comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Faking X Display for IDL Bridge
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Faking X Display for IDL Bridge [message #72421] Tue, 14 September 2010 07:18
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Allard,
thanks for the tip. Xvfb was actually the first program that showed up
on my google search and was also recommended on David Fanning's web
site. However, I was unable to make it work. It was probably due to my
impatience. vncserver worked right away so I stuck with it.

Cheers,
Haje

On Sep 14, 3:35 am, Allard de Wit <allard.de...@wur.nl> wrote:
> Haje,
>
> Have a look at the virtual framebuffer:http://en.wikipedia.org/wiki/Xvfb
>
> This one allows you to have X display without a physical screen.
>
> Allard
Re: Faking X Display for IDL Bridge [message #72422 is a reply to message #72421] Tue, 14 September 2010 00:35 Go to previous message
wita is currently offline  wita
Messages: 43
Registered: January 2005
Member
Haje,

Have a look at the virtual framebuffer:
http://en.wikipedia.org/wiki/Xvfb

This one allows you to have X display without a physical screen.

Allard
Re: Faking X Display for IDL Bridge [message #72424 is a reply to message #72422] Mon, 13 September 2010 10:52 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Lajos,
thanks for the additional input. With your help, I managed to get the
system up and running. In case anyone is interested, the trick was to
first fire up vncserver to set the password. Then, in the shell script
that is called from the cron job, I first set "vncserver :20" to
create the virtual x window and then also do "setenv DISPLAY
machine_name:20". IDL and the IDL_IDLBridge will then no longer
complain about the missing X connection. Problem solved, although I do
believe that IDL should be more user friendly to this regard.

Thanks very much again for everyone's responses.

Cheers,
Haje

On Sep 13, 11:29 am, FÖLDY Lajos <fo...@rmki.kfki.hu> wrote:
> On Mon, 13 Sep 2010, Haje Korth wrote:
>> Lajos,
>> do you have usage instructions? I started vncserver and then IDL but I
>> still get the message "cannot connect to X windows display"
>
>> Haje
>
> - login to the server
> - vncserver
>       this prints something like:
>       ...
>       New 'X' desktop is server:1
>       ...
> - vncviewer server:1
> - open a terminal, start your IDL job
> - exit vncviewer (usually F8)
> - logout
>
> Any time later:
>
> - login to the server
> - vncviewer server:1
> - check your output, ...
> - exit vncviewer
> - (vncserver -kill server:1 if your job is finished)
> - logout
>
> regards,
> lajos
Re: Faking X Display for IDL Bridge [message #72425 is a reply to message #72424] Mon, 13 September 2010 08:29 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Mon, 13 Sep 2010, Haje Korth wrote:

> Lajos,
> do you have usage instructions? I started vncserver and then IDL but I
> still get the message "cannot connect to X windows display"
>
> Haje


- login to the server
- vncserver
this prints something like:
...
New 'X' desktop is server:1
...
- vncviewer server:1
- open a terminal, start your IDL job
- exit vncviewer (usually F8)
- logout

Any time later:

- login to the server
- vncviewer server:1
- check your output, ...
- exit vncviewer
- (vncserver -kill server:1 if your job is finished)
- logout


regards,
lajos
Re: Faking X Display for IDL Bridge [message #72426 is a reply to message #72425] Mon, 13 September 2010 08:13 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Lajos,
do you have usage instructions? I started vncserver and then IDL but I
still get the message "cannot connect to X windows display"

Haje

On Sep 13, 11:05 am, FÖLDY Lajos <fo...@rmki.kfki.hu> wrote:
> On Mon, 13 Sep 2010, Haje Korth wrote:
>> Hi,
>> I just had this great idea of forking IDL jobs on my 16-CPU server
>> using the IDL to IDL Bridge. The code runs great from the command line
>> but using a UNIX cron job I get the error message "IDL_IDLBridge:
>> Unable to establish X Connection." To late did I understand the the
>> help that reads:
>
>> "Warning: On UNIX systems, the IDL_IDLBridge requires that the DISPLAY
>> environment variable be set to a valid X Windows display. If no
>> display is available, execution of the IDL_IDLBridge will halt, with
>> error messages that include:IDL_IDLBridge: Unable to establish X
>> Connection."
>
>> The requirement for an X display seems silly, as my code does not
>> display anything. Is there a way to fake the existence of an X window?
>> Or did I just wasted my time coding this feature?
>
>> Haje
>
> vncserver is your friend.
>
> regards,
> Lajos
Re: Faking X Display for IDL Bridge [message #72427 is a reply to message #72426] Mon, 13 September 2010 08:06 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Jeff,
coding the bridge was not that difficult after googleing a few
examples, some of which were found in this news group.The code I ended
up using is given below.

I am trying to set the display variable but I must be doing this
wrong as it is not working. I am also looking at Xvfb per David
Fannings web site, but I am not smart enough to make it work.

Haje


obridge=objarr(nproc)
for chain=0,nproc-1 do obridge[chain]=obj_new('idl_idlbridge')

for chain=0,nproc-1 do begin
j=i+chain
if (j lt cnt) then begin
fname=files[idx[j]]
obridge[chain]->setvar,'fname',fname
obridge[chain]->execute,'idl_process,fname',/nowait
endif
endfor

for chain=0,nproc-1 do while obridge[chain]->status() ne 0 do
wait,0.0001

obj_destroy,obridge
obridge=objarr(nproc)
for chain=0,nproc-1 do obridge[chain]=obj_new('idl_idlbridge')



On Sep 13, 10:39 am, "Jeff N." <jeffnettles4...@gmail.com> wrote:
> On Sep 13, 10:30 am, Haje Korth <hajeko...@gmail.com> wrote:
>
>
>
>> Hi,
>> I just had this great idea of forking IDL jobs on my 16-CPU server
>> using the IDL to IDL Bridge. The code runs great from the command line
>> but using a UNIX cron job I get the error message "IDL_IDLBridge:
>> Unable to establish X Connection." To late did I understand the the
>> help that reads:
>
>> "Warning: On UNIX systems, the IDL_IDLBridge requires that the DISPLAY
>> environment variable be set to a valid X Windows display. If no
>> display is available, execution of the IDL_IDLBridge will halt, with
>> error messages that include:IDL_IDLBridge: Unable to establish X
>> Connection."
>
>> The requirement for an X display seems silly, as my code does not
>> display anything. Is there a way to fake the existence of an X window?
>> Or did I just wasted my time coding this feature?
>
>> Haje
>
> I'm not a linux expert by any means, so forgive me if this is stupid,
> but couldn't you just set the display env't variable anyway whether
> you use it or not?  It does seem silly that you have to set it whether
> or not you use it, but is there any harm in just setting it?
>
> On another note, how difficult was it to code up the IDL_IDLBridge
> forking?  I've thought about this myself but haven't really dived into
> doing it other than a few (failed) half-hearted stabs.
>
> Jeff
Re: Faking X Display for IDL Bridge [message #72428 is a reply to message #72427] Mon, 13 September 2010 08:05 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Mon, 13 Sep 2010, Haje Korth wrote:

> Hi,
> I just had this great idea of forking IDL jobs on my 16-CPU server
> using the IDL to IDL Bridge. The code runs great from the command line
> but using a UNIX cron job I get the error message "IDL_IDLBridge:
> Unable to establish X Connection." To late did I understand the the
> help that reads:
>
> "Warning: On UNIX systems, the IDL_IDLBridge requires that the DISPLAY
> environment variable be set to a valid X Windows display. If no
> display is available, execution of the IDL_IDLBridge will halt, with
> error messages that include:IDL_IDLBridge: Unable to establish X
> Connection."
>
> The requirement for an X display seems silly, as my code does not
> display anything. Is there a way to fake the existence of an X window?
> Or did I just wasted my time coding this feature?
>
> Haje

vncserver is your friend.

regards,
Lajos
Re: Faking X Display for IDL Bridge [message #72429 is a reply to message #72428] Mon, 13 September 2010 07:39 Go to previous message
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On Sep 13, 10:30 am, Haje Korth <hajeko...@gmail.com> wrote:
> Hi,
> I just had this great idea of forking IDL jobs on my 16-CPU server
> using the IDL to IDL Bridge. The code runs great from the command line
> but using a UNIX cron job I get the error message "IDL_IDLBridge:
> Unable to establish X Connection." To late did I understand the the
> help that reads:
>
> "Warning: On UNIX systems, the IDL_IDLBridge requires that the DISPLAY
> environment variable be set to a valid X Windows display. If no
> display is available, execution of the IDL_IDLBridge will halt, with
> error messages that include:IDL_IDLBridge: Unable to establish X
> Connection."
>
> The requirement for an X display seems silly, as my code does not
> display anything. Is there a way to fake the existence of an X window?
> Or did I just wasted my time coding this feature?
>
> Haje

I'm not a linux expert by any means, so forgive me if this is stupid,
but couldn't you just set the display env't variable anyway whether
you use it or not? It does seem silly that you have to set it whether
or not you use it, but is there any harm in just setting it?

On another note, how difficult was it to code up the IDL_IDLBridge
forking? I've thought about this myself but haven't really dived into
doing it other than a few (failed) half-hearted stabs.

Jeff
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Faking X Display for IDL Bridge
Next Topic: KRSgrAVI or another AVI multi-platform library

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:48:09 PDT 2025

Total time taken to generate the page: 0.40423 seconds