[GRASS-user] execute commands automatically after start of grass

2008-08-01 Thread Rainer M Krug
Hi

I am using grass in combination with R, wherefore I have to start R
(or emacs) after starting grass.
Is there any way, to make this automatic, i.e., can I specify a script
which is executed inside grass after it is started?
In addition, I only would like that to happen when I start grass in a
certain mapset and not in other mapsets.


Thanks

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] execute commands automatically after start of grass

2008-08-01 Thread Jachym Cepicky
hi,

you can adjust anything in .grass.bashrc file

e.g.

#!/bin/sh
export GRASS_ADDON_PATH=$HOME/usr/grass/
export GRASS_PAGER=/bin/more


jachym

[1] http://grass.osgeo.org/grass64/manuals/html64_user/variables.html

2008/8/1 Rainer M Krug [EMAIL PROTECTED]:
 Hi

 I am using grass in combination with R, wherefore I have to start R
 (or emacs) after starting grass.
 Is there any way, to make this automatic, i.e., can I specify a script
 which is executed inside grass after it is started?
 In addition, I only would like that to happen when I start grass in a
 certain mapset and not in other mapsets.


 Thanks

 Rainer

 --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Plant Conservation Unit
 Department of Botany
 University of Cape Town
 Rondebosch 7701
 South Africa
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user




-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] execute commands automatically after start of grass

2008-08-01 Thread Rainer M Krug
On Fri, Aug 1, 2008 at 11:16 AM, Jachym Cepicky
[EMAIL PROTECTED] wrote:
 hi,

 you can adjust anything in .grass.bashrc file

 e.g.

 #!/bin/sh
 export GRASS_ADDON_PATH=$HOME/usr/grass/
 export GRASS_PAGER=/bin/more

Thanks - that looks exactly what I am looking for.
But is there a way of specifying a certain .grass.bashrc which should be used?

The reasoning is that for certain projects I need R and emacs and
would like to start them automatically, for others not. Obviously, I
could use a startup script which renames the apropriate file to
.grass.bashrc, but it would be cleaner to be able to specify it when
starting grass.




 jachym

 [1] http://grass.osgeo.org/grass64/manuals/html64_user/variables.html

 2008/8/1 Rainer M Krug [EMAIL PROTECTED]:
 Hi

 I am using grass in combination with R, wherefore I have to start R
 (or emacs) after starting grass.
 Is there any way, to make this automatic, i.e., can I specify a script
 which is executed inside grass after it is started?
 In addition, I only would like that to happen when I start grass in a
 certain mapset and not in other mapsets.


 Thanks

 Rainer

 --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Plant Conservation Unit
 Department of Botany
 University of Cape Town
 Rondebosch 7701
 South Africa
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user




 --
 Jachym Cepicky
 e-mail: jachym.cepicky gmail com
 URL: http://les-ejk.cz
 GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub




-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] execute commands automatically after start of grass

2008-08-01 Thread Rainer M Krug
On Fri, Aug 1, 2008 at 2:35 PM, Daniel Victoria
[EMAIL PROTECTED] wrote:
 Why not put a test inside .grass.bashrc to check if you are in the
 mapset you want R to run?
 Something like:
 pseudo-code here - can't remember bash sintax
 if [ $MAPSET = __your_targuet__ ]; do
   r 
  emacs 
 fi

Good idea - I think I will go that way.

Rainer


 Cheers
 Daniel

 On Fri, Aug 1, 2008 at 6:23 AM, Rainer M Krug [EMAIL PROTECTED] wrote:
 On Fri, Aug 1, 2008 at 11:16 AM, Jachym Cepicky
 [EMAIL PROTECTED] wrote:
 hi,

 you can adjust anything in .grass.bashrc file

 e.g.

 #!/bin/sh
 export GRASS_ADDON_PATH=$HOME/usr/grass/
 export GRASS_PAGER=/bin/more

 Thanks - that looks exactly what I am looking for.
 But is there a way of specifying a certain .grass.bashrc which should be 
 used?

 The reasoning is that for certain projects I need R and emacs and
 would like to start them automatically, for others not. Obviously, I
 could use a startup script which renames the apropriate file to
 .grass.bashrc, but it would be cleaner to be able to specify it when
 starting grass.




 jachym

 [1] http://grass.osgeo.org/grass64/manuals/html64_user/variables.html

 2008/8/1 Rainer M Krug [EMAIL PROTECTED]:
 Hi

 I am using grass in combination with R, wherefore I have to start R
 (or emacs) after starting grass.
 Is there any way, to make this automatic, i.e., can I specify a script
 which is executed inside grass after it is started?
 In addition, I only would like that to happen when I start grass in a
 certain mapset and not in other mapsets.


 Thanks

 Rainer

 --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Plant Conservation Unit
 Department of Botany
 University of Cape Town
 Rondebosch 7701
 South Africa
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user




 --
 Jachym Cepicky
 e-mail: jachym.cepicky gmail com
 URL: http://les-ejk.cz
 GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub




 --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Faculty of Science
 Natural Sciences Building
 Private Bag X1
 University of Stellenbosch
 Matieland 7602
 South Africa
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user





-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user