[GRASS-user] Error with g.mapset in Linux (ubuntu)

Greetings
I have a Python script that is suppose to use g.mapset to change the current Mapset by running g.mapset but, everytime I run it I ge this error:
ERROR: Unable to read GIS_LOCK environment variable

Hi there
I have sent an email a couple of days ago reporting an error with g.mapset on Windows. Now I have also a problem with g.mapset on linux (a different one)
When I do:

g.mapset mapset=Regional
I get this in Output command window:

Erasing monitors…
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: map.png,
GRASS_WIDTH=768, GRASS_HEIGHT=501
ERROR: PNG: couldn’t open output file map.png

As anyone has any suggestion regarding this?

Thanks
Helena

Helena Herrera wrote:

I have sent an email a couple of days ago reporting an error with g.mapset
on Windows. Now I have also a problem with g.mapset on linux (a different
one)
When I do:
g.mapset mapset=Regional

I get this in Output command window:

Erasing monitors...
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: map.png,
GRASS_WIDTH=768, GRASS_HEIGHT=501
ERROR: PNG: couldn't open output file map.png

This suggests that you don't have write permission on the current
directory.

In 6.x, g.mapset restarts any active monitors, as any information
which they are storing will be invalid in the new mapset. By default,
the PNG driver sends its output to the file "map.png" in the current
directory; if you don't have write permission on the current
directory, you will get an error.

You can prevent this by specifying the PNG driver's output file using
an absolute path, e.g.:

  export GRASS_PNGFILE=`pwd`/map.png

--
Glynn Clements <glynn@gclements.plus.com>

It worked
Thanks
Helena

On Thu, Sep 23, 2010 at 3:49 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Helena Herrera wrote:

I have sent an email a couple of days ago reporting an error with g.mapset
on Windows. Now I have also a problem with g.mapset on linux (a different
one)
When I do:
g.mapset mapset=Regional

I get this in Output command window:

Erasing monitors…
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: map.png,
GRASS_WIDTH=768, GRASS_HEIGHT=501
ERROR: PNG: couldn’t open output file map.png

This suggests that you don’t have write permission on the current
directory.

In 6.x, g.mapset restarts any active monitors, as any information
which they are storing will be invalid in the new mapset. By default,
the PNG driver sends its output to the file “map.png” in the current
directory; if you don’t have write permission on the current
directory, you will get an error.

You can prevent this by specifying the PNG driver’s output file using
an absolute path, e.g.:

export GRASS_PNGFILE=pwd/map.png


Glynn Clements <glynn@gclements.plus.com>