GIS manager

From GRASS-Wiki
Revision as of 10:29, 9 February 2013 by ⚠️NikosA (talk | contribs) (OldGRASSVersion)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


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?

A: Edit

  $GISBASE/etc/gm/gmmenu.tcl

Or alternatively, create $GISBASE/etc/xtnmenu.dat file, or <dir>/xtnmenu.dat for any <dir> in $GRASS_ADDON_ETC.

Use:

  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.