5

In Vaclav Petras' GRASS add-on guide it is stated that GUI toolboxes for GRASS add-ons are defined in the toolboxes.xml file, that must then be added to the main installation folder:

You have to copy this file toolboxes.xml to the GRASS GIS configuration directory in your home directory (e.g., ~/.grass7/toolboxes/toolboxes.xml on Linux).

This mean that when a user installs an add-on using the g.extension tool a GUI is not made available automatically. As far as I understand, the user must update the toolboxes.xml file her/himself.

Is there any way to automatically register a GUI toolbox in the user's system?

5

The automatic registration actually happens for all add-ons installed from the official Addons repository. You can find in the Modules in the Layer Manager. The Addons show as a toolbox (group) on the same level as Raster or Vector:

GRASS GIS Layer Manager Modules tab with Addons node

If you use g.extension on Linux (and other unix-like systems) with your local code or code which is let's say on GitHub, nothing is currently added to the list. You can open a feature request for it.

If you want to add your modules (like the above, not the ones in the Addons repository), you need to add and modify the files as described in the workshop material.

The best way is to actually submit submit the code to the Addons repository because you get not only the entry in GUI, but also selection and installation through a list in GUI, installation supported on MS Windows, online documentation linked with the rest, and its a way which works even for C/C++ modules (even on MS Windows).

Please note that the workshop material you are linking is 2 years old. It is still valid, but it misses some of the nice features like compiling outside of the GRASS Addons with g.extension.

  • I can access the GUI for the add-on going through the menus you show. But why isn't the GUI starting up from the command line? Like with built-in modules? – Luís de Sousa Jul 10 '17 at 8:50
  • That seems like a separate question. Please include information about how the custom module was installed/compiled, which command line (Console in GUI or system terminal), when the GUI actually starts elsewhere, and what happens when you use --ui as a parameter. – wenzeslaus Jul 11 '17 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.