[GRASSLIST:840] Re: have GRASS executing a command at startup

Hamish hamish_nospam at yahoo.com
Mon Apr 24 04:09:51 EDT 2006


> Is there a way to make GRASS execute a command at startup? I have been 
> trying to do it for a while with no success. Among other things, I have 
> tried somenthing like:
> 
> echo scriptName | grass60


for GIS commands:
  http://grass.itc.it/pipermail/grassuser/2006-April/033601.html

and search for other similar posts in the mailing list archives.



You can put non-GIS startup commands in ~/.grass.bashrc (or .grass.cshrc)
see http://grass.ibiblio.org/grass61/manuals/html61_user/variables.html


e.g.:
Setting enviro vars 
 export GRASS_HTML_BROWSER=dillo
 export GRASS_PNG_COMPRESSION=9

Aliases:
 alias d.font.vera='d.font.freetype /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf'

I like to set GRASS to a low priority so I can still use the system while
number crunching:
GRASS_PROC="`pgrep Init.sh`"
if [ -n "$GRASS_PROC" ] ; then
   echo "Setting GRASS priority low [proc $$]"
   renice +16 -p $$
fi


Use a shorter prompt:  PS1="GRASS:\W > "

etc.


Hamish




More information about the grass-user mailing list