- Applies to GRASS Versions 5 and 6 (pre 6.4) -
Q: Is it possible to add a menu item to the GIS manager window in a similar fashion. Any tips and hints on how to add on an extra menu item in the gis.m gis manager?
Or alternatively, create $GISBASE/etc/xtnmenu.dat file, or <dir>/xtnmenu.dat for any <dir> in $GRASS_ADDON_ETC.
export GRASS_ADDON_ETC=<dir> (or equivalent in non bash shell)
to set the environmental variable.
and make sure that all externally called scripts or programs are executable and their location included in the $PATH variable by calling
export PATH=$PATH:<exec dir>
The xtnmenu.dat format is a colon delimited format with 4 columns.
The four columns consist of a menu location, the menu text, the program or script name and a help text.
An example menu item in the xtnmenu.dat file calling the existing r.stats module:
0:The text in the menu:r.stats:The help text in the lower part of the gui manager
The menu location (0 in the example above) is not yet used and can be omitted. However the colon before the menu text field should remain.