GIS manager: Difference between revisions
(New FAQ) |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{OldGRASSVersion}} | |||
- '''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?'' | '''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?'' | ||
Line 4: | Line 8: | ||
$GISBASE/etc/gm/gmmenu.tcl | $GISBASE/etc/gm/gmmenu.tcl | ||
Or alternatively, create $GISBASE/etc/xtnmenu.dat file, or <dir>/xtnmenu.dat for any <dir> in $GRASS_ADDON_ETC. | 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. | |||
[[Category: FAQ]] | [[Category: FAQ]] |
Latest revision as of 07:56, 10 February 2013
- 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?
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.