[GRASS-dev] scripts don't launch GUI from the msys command line in winGRASS

-----Ursprüngliche Nachricht-----
Von: "Glynn Clements"
Gesendet: 04.02.10 21:16:59
Helmut Kudrnovsky wrote:

>So far, I've only seen this in Vista and am wondering if anyone else has seen it. Using the nightly build from 2 February.
>
>From the command line, type the name of a script, like r.blend, without arguments
>Instead of the GUI popping up, there is an error complaining about the lack of arguments.
>
>It's like g.parser is not being invoked.

i can confirm this changed behaviour, typing a command without arguments and no GUI popping up.

tested on WinVista32 with self compiled Grass64 and Grass65

Note that if GRASS_GUI is tcltk, it won't work, due to G_popen() not
working at all on Windows (execl() works like on Unix, i.e. it doesn't
return if it succeeds; but unlike Unix, Windows doesn't have fork()).

Using the new G_popen() from 7.0 is one option.

--
Glynn Clements <glynn@gclements.plus.com>

I've tried this from the msys-shell, for example g.region, r.blend, ..., and if I remember correctly, this worked by popping up the gui until a week ago or so.

here is the error message:

"GRASS 6.4> r.blend

Fehler: Benötigter Parameter <first> ist nicht gesetzt:
    (Name der ersten Rasterkarte für die Mischung.).

error: needed parameter <first> not set

Fehler: Benötigter Parameter <second> ist nicht gesetzt:
    (Name der zweiten Rasterkarte für die Mischung.).

error: needed parameter <second> not set

Fehler: Benötigter Parameter <output> ist nicht gesetzt:
    (Präfix für die rote, grüne und blaue Ausgabekarte der erstellten Mischung.).

error: needed parameter <output> not set"

but it's working from the wx-gui-command-line, from the tcltk-command-line (by the buttons "run in background","run GUI", and "run in DOS-box").

tested here on another WinVista32-box withthe nightly build WinGRASS-6.4.SVN-r40792-1-Setup.exe

Helmut

______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de

Helmut Kudrnovsky wrote:

I've tried this from the msys-shell, for example g.region, r.blend,
..., and if I remember correctly, this worked by popping up the gui
until a week ago or so.

here is the error message:

"GRASS 6.4> r.blend

Fehler: Benötigter Parameter <first> ist nicht gesetzt:
    (Name der ersten Rasterkarte für die Mischung.).

error: needed parameter <first> not set

Actually, the error is:

  _("\nERROR: Required parameter <%s> not set:\n (%s).\n"),

If possible, run with LC_ALL=C when posting error messages, as this
will use the untranslated error message which can then be located with
"grep".

Fehler: Benötigter Parameter <second> ist nicht gesetzt:
    (Name der zweiten Rasterkarte für die Mischung.).

error: needed parameter <second> not set

Fehler: Benötigter Parameter <output> ist nicht gesetzt:
    (Präfix für die rote, grüne und blaue Ausgabekarte der erstellten Mischung.).

error: needed parameter <output> not set"

but it's working from the wx-gui-command-line, from the
tcltk-command-line (by the buttons "run in background","run GUI", and
"run in DOS-box").

From the command line, the GUI is only used if the --ui flag is given

or if no arguments are given, stdin is a terminal (according to
isatty()), and interactivity hasn't been disabled by the module.

Note that MSys' rxvt *isn't* considered a terminal by Windows'
isatty() function, so programs run from rxvt won't display a GUI
unless you use the --ui switch.

--
Glynn Clements <glynn@gclements.plus.com>