f



IDL Bridge

Dear all,

I'm trying to automatize the download of files from the internet and, in order to speed up the process, I use the IDL_IDLBRIDGE to download 2 files at the same time. 
However, when I put the download in a crontab I get the following error (or when I execute the command from a remote machine) :

% Compiled module: SCARICO_12.
% Loaded DLM: IDL_IDLBRIDGE.
/usr/local/bin/wget ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.2016121912/gfs.t12z.pgrb2.0p25.f000
% Restored file: IDL_IDLBRIDGE::EXECUTETIMER.
% WIDGET_BASE: Unable to connect to X Windows display: :0.0
% SCARICO_12: IDL_IDLBridge: Unable to establish X Connection.
% Execution halted at: SCARICO_12         40 /Users/stefano/scarico/scarico_12.pro


How can I solve this problem?
Thanks
Stefano
0
s
12/20/2016 2:58:33 PM
comp.lang.idl-pvwave 12260 articles. 2 followers. Post Follow

2 Replies
282 Views

Similar Articles

[PageSpeed] 16

On Tuesday, December 20, 2016 at 7:58:35 AM UTC-7, s.fd...@gmail.com wrote:
> Dear all,
>=20
> I'm trying to automatize the download of files from the internet and, in =
order to speed up the process, I use the IDL_IDLBRIDGE to download 2 files =
at the same time.=20
> However, when I put the download in a crontab I get the following error (=
or when I execute the command from a remote machine) :
>=20
> % Compiled module: SCARICO_12.
> % Loaded DLM: IDL_IDLBRIDGE.
> /usr/local/bin/wget ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod=
/gfs.2016121912/gfs.t12z.pgrb2.0p25.f000
> % Restored file: IDL_IDLBRIDGE::EXECUTETIMER.
> % WIDGET_BASE: Unable to connect to X Windows display: :0.0
> % SCARICO_12: IDL_IDLBridge: Unable to establish X Connection.
> % Execution halted at: SCARICO_12         40 /Users/stefano/scarico/scari=
co_12.pro
>=20
>=20
> How can I solve this problem?
> Thanks
> Stefano

Hi Stefano,
In general, this error will be displayed if you attempt to use UI elements =
in a headless environment that lacks access to an X Windows server, such as=
 in a cron job.

In this case, there's some code that's making a timer widget call, which is=
n't available in this environment.

In this case your code uses a method "IDL_IDLBridge::ExecuteTimer" that is =
not part of the base distribution of the class. There is a good chance that=
 this is part of the issue.  Someone must have written a .pro file that exe=
cutes some timer widget logic, and packaged the logic up in a .pro file.=20

If possible, it would make sense to replace the logic associated with timer=
 widget calls in your code with calls to the TIMER() class that was introdu=
ced in IDL 8.3, http://www.harrisgeospatial.com/docs/TIMER.html.  It gets a=
round the need for an underlying X Windows server.

Jim P.
0
Jim
12/20/2016 3:28:42 PM
On Tuesday, December 20, 2016 at 9:58:35 AM UTC-5, s.fd...@gmail.com wrote:
> Dear all,
> 
> I'm trying to automatize the download of files from the internet and, in order to speed up the process, I use the IDL_IDLBRIDGE to download 2 files at the same time. 
> However, when I put the download in a crontab I get the following error (or when I execute the command from a remote machine) :
> 
> % Compiled module: SCARICO_12.
> % Loaded DLM: IDL_IDLBRIDGE.
> /usr/local/bin/wget ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.2016121912/gfs.t12z.pgrb2.0p25.f000
> % Restored file: IDL_IDLBRIDGE::EXECUTETIMER.
> % WIDGET_BASE: Unable to connect to X Windows display: :0.0
> % SCARICO_12: IDL_IDLBridge: Unable to establish X Connection.
> % Execution halted at: SCARICO_12         40 /Users/stefano/scarico/scarico_12.pro

Your IDL is trying to connect to an X windows display that doesn't exist.  The easiest way is to tell IDL that your display doesn't exist.  Do this before you execute IDL:  (pick whichever line matches your shell)
  unsetenv DISPLAY         # this is for csh or tcsh
  unset DISPLAY            # this is for bash or sh
And then to be sure, within IDL, tell IDL to use a different device...
  set_plot, 'Z'
Here 'Z' means the Z-buffer, which doesn't try to connect to any screen.

Craig
0
Craig
12/20/2016 3:35:40 PM
Reply: