[GRASS5] concurrent sessions?

Glynn Clements glynn.clements at virgin.net
Tue Feb 10 23:43:27 EST 2004


Jeff D. Hamann wrote:

> Will it be possible to run more than one grass session in future releases
> (>=5.3)?

I presume that you mean more than one session per user. In which case:

It's possible now; you just have to customise the initialisation
script (etc/Init.sh).

The main issues are:

1. You cannot use the same mapset directory for multiple sessions.
This limitation probably won't be going away any time soon, as
removing it would involve a significant amount of work.

2. You need to use a different $GISRC file for each session, e.g.:

	GISRC="$HOME/.grassrc5.$$"
	export GISRC
	cp -f $HOME/.grassrc5 $GISRC

3. You need to remove or disable the locking code:

	# Check for concurrent use
	"$ETC/lock" "$lockfile" $$
	case $? in
	    0) ;;
	    1)
	    	echo `whoami` is currently running GRASS. Concurrent use not allowed.
	    	exit ;;
	    *)
	    	echo Unable to properly access "$lockfile"
	    	echo Please notify system personel.
	    	exit ;;
	esac

3. There is one set of monitors per user, not per session. Using the
same monitor from multiple sessions may have unexpected results.

Note: it used to be per-session; it was changed between 5.0.0-pre2 and
5.0.0-pre3. The sockets used to be kept in the .tmp subdirectory of
the mapset directory, so you had a different set for each session. 
They were moved to /tmp/grass-<username> to eliminate problems which
some users had when GISDBASE was on an NFS mount.

Changing it back is simply be a matter of changing _get_make_sock_path
in src/libes/gis/unix_socks.c.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list