On Fri, 22 Feb 2019, Allin Cottrell wrote:
On Fri, 22 Feb 2019, Sven Schreiber wrote:
> Hi,
>
> the following happened when running the awm.inp example file from the SVAR
> addon on a console-only installation (Linux), within a "gretlcli" session
> via gretl's 'run' command.
>
> The awm.inp script must fail because it tries to send stuff to gnuplot with
> the "display" option. That's understood. Here is some error output:
>
> gnuplot stderr: '01:48:52 PM: Error: Unable to initialize GTK+, is DISPLAY
> set properly?
> Failed to initialize wxWidgets.
> '
> Failed command: 'gnuplot -persist
"/home/gretlcheck/.gretl/gpttmp.plt"'
>
> However, after that I don't get back to the gretlcli prompt ("?"), but
> instead gretl(cli) terminates and I'm at the shell prompt. And I think
> that's not right.
I've experimented with running a script containing deliberate
errors under "run" in gretlcli and mostly you get the interactive
prompt back. An error in calling gnuplot (or maybe an error in
calling any external program?) seems to be the exception. I'll see
what I can find out about this.
Hmm, it's more complicated than I thought. In the Linux console (X
not running) I tried this script under "run" in gretlcli:
<hansl>
function scalar badplot (list L)
loop i=1..2 -q
gnuplot L --output=display
endloop
return 0
end function
function scalar topfunc (list L)
return badplot(L)
end function
open data4-10
list L = 1 2
x = topfunc(L)
</hansl>
You'll see that I'm trying to emulate the SVAR situation by putting
the (unrealizable) gnuplot call inside a loop, in a function called
by a function. Yet here, too, the inevitable failure of the plot
call lands me back at the gretlcli interactive prompt -- I'm not
dumped out to the shell.
So more investigation needed!
Allin