Skip to content

linkGRASS(): suggestion to let 'g.gui' work #24

@florisvdh

Description

@florisvdh

FYI, and perhaps you can use the idea. Some time ago (using the CRAN version) I noticed that g.gui did not work from R, using system() or execGRASS(). At least in Linux (Mint) it seems that this can be solved by setting an environment variable GRASS_PYTHON:

if (.Platform$OS.type == "unix") {
  Sys.setenv(GRASS_PYTHON = reticulate::py_discover_config() %>% 
                          as.character() %>% 
                          .[1])
}

Maybe you can manage to set this with link2GI, cross-platform? Being able to open the GUI from R seems an interesting feature; it comes in handy to do some quick inspections.

EDIT: the above code won't run anymore as intended, when using recent reticulate. See below for an update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions