Are there any objections to enable multiple sessions
(one per mapset) in 5.7? Basically:
cp $HOME/.grassrc57 /tmp/grass57-$USER/gisrc.$$
set GISDBASE, LOCATION_NAME, MAPSET
check $LOCATION/.gislock
run GRASS session
rm -f $LOCATION/.gislock
cp /tmp/grass57-$USER/gisrc.$$ $HOME/.grassrc57
rm -f /tmp/grass57-$USER/gisrc.$$
Suggested patch is attached.
Radim
(attachments)
init.sh.patch (2.32 KB)
Radim Blazek wrote:
Are there any objections to enable multiple sessions
(one per mapset) in 5.7? Basically:
cp $HOME/.grassrc57 /tmp/grass57-$USER/gisrc.$$
set GISDBASE, LOCATION_NAME, MAPSET
check $LOCATION/.gislock
run GRASS session
rm -f $LOCATION/.gislock
cp /tmp/grass57-$USER/gisrc.$$ $HOME/.grassrc57
rm -f /tmp/grass57-$USER/gisrc.$$
There is one set of monitors per user, but monitors are tied to the
session in which they are started due to the redraw-on-resize code
(any commands will be run with $GISRC set to the value which the
driver inherited from mon.start).
I think that we would really need to have one set of monitors per
session. Either that, or just remove the redraw-on-resize code (which
would be a good thing in any case).
--
Glynn Clements <glynn.clements@virgin.net>
On Thursday 13 May 2004 21:05, Glynn Clements wrote:
Radim Blazek wrote:
> Are there any objections to enable multiple sessions
> (one per mapset) in 5.7? Basically:
>
> cp $HOME/.grassrc57 /tmp/grass57-$USER/gisrc.$$
> set GISDBASE, LOCATION_NAME, MAPSET
> check $LOCATION/.gislock
> run GRASS session
> rm -f $LOCATION/.gislock
> cp /tmp/grass57-$USER/gisrc.$$ $HOME/.grassrc57
> rm -f /tmp/grass57-$USER/gisrc.$$
There is one set of monitors per user, but monitors are tied to the
session in which they are started due to the redraw-on-resize code
(any commands will be run with $GISRC set to the value which the
driver inherited from mon.start).
I think that we would really need to have one set of monitors per
session. Either that, or just remove the redraw-on-resize code (which
would be a good thing in any case).
So, change _get_make_sock_path() (lib/gis/unix_socks.c) to return
/tmp/grass'VERSION_MAJOR''VERSION_MINOR'-$USER-$GIS_LOCK
instead of
/tmp/grass'VERSION_MAJOR''VERSION_MINOR'-$USER
set $GISRC to tmp/grass57-$USER-$GIS_LOCK/gisrc
and close all running monitors when GRASS session is closed.
Patches attached.
Radim
(attachments)
unix_socks.c.patch (1.32 KB)
init.sh.patch2 (2.78 KB)