[GRASS5] concurrent sessions?

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

---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
(office) 541-754-1428
(cell) 541-740-5988
jeff.hamann@forestinformatics.com
www.forestinformatics.com

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@virgin.net>