[GRASS-dev] "Max OS 10.8: g.gui and DISPLAY"

Glynn Clements glynn at gclements.plus.com
Wed Aug 28 13:47:40 PDT 2013


Vaclav Petras wrote:

> Anna and I are trying to compile GRASS 7 on Mac OS 10.8. Although there
> were some problems we were able to compile it.
> 
> But than we were not able to start GRASS because initialization ended with
> the error message about missing X Window system. This comes from
> init/grass.py where it checks for DISPLAY variable. The variable is not
> set. Do we need it to test it for GRASS7 and Mac OS? Setting to any value
> (e.g., export DISPLAY=0) solved the problem.

That's a bug in grass.py:

    if os.getenv('DISPLAY') or windows:

That should probably be:

    if os.getenv('DISPLAY') or windows or macosx:

> The second error appears when we try to launch GUI from command line using
> g.gui (i.e., the error does not happen during GRASS launch):
> 
>  wxgui.py: posix_spawn: /Users/...wxpython/wxgui.py2.7: No such file or
> directory
> 
> Changing the second parameter of G_spawn_ex to a 'python' instead of a
> 'python source' solved the problem:

That looks fine. When executing a script from the shell, argv[0] is
the path to the interpreter rather than that of the script.

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


More information about the grass-dev mailing list