In article <9308231655.AA12849@hpc.lut.ac.uk> you wrote:
: _data_, but a comparatively weaker concept of multi-user _displays_. In the
: long-term, it would appear that user-specific monitors should be allocated on
: demand. Which raises the question of whether it is possible or sensible to
: write dynamically to the <etc/monitorcap> file at run-time?
This could be done in GIS.sh. For instance we changed this script in a
way, that each time a user starts GRASS, an individual monitorcap and
individual fifos will be created in /tmp. With changes in three (see below)
files it is possible to run GRASS by different users at the same time.
In total we made the following changes:
src/libes/raster/parse_mon.c:
Force programs to look for monitorcap in /tmp instead of $GISBASE/etc).
etc/monitorcap:
change the name of the fifos in a way, that makes it easier to be
modified automaticaly. For example change the line
/tmp/fifo_x0.in /tmp/fifo_x0.out \
in
/tmp/fifoxxxx_x0.in /tmp/fifoxxxx_x0.out \
etc/GIS.sh:
Insert the following lines just before 'trap "" 2 3' to create
individual monitorcap and fifos:
GUSER=`whoami`
sed "s/fifoxxxx/fifo_$GUSER/g" $GISBASE/etc/monitorcap > /tmp/monitorcap_$GUSER
# create fifo's
if [ ! -p /tmp/'fifo_'$GUSER'_x0.in' ]
then
/etc/mknod /tmp/'fifo_'$GUSER'_x0.in' p
/etc/mknod /tmp/'fifo_'$GUSER'_x0.out' p
/etc/mknod /tmp/'fifo_'$GUSER'_x1.in' p
/etc/mknod /tmp/'fifo_'$GUSER'_x1.out' p
/etc/mknod /tmp/'fifo_'$GUSER'_cell.in' p
/etc/mknod /tmp/'fifo_'$GUSER'_cell.out' p
chmod 0666 /tmp/fifo_$GUSER*
fi
At the end of GIS.sh insert:
rm /tmp/fifo_$GUSER*
rm /tmp/monitorcap_$GUSER*
If there are any questions feel free to contact me.
M. Schroeder
*************************************************
| Martin Schroeder |
| Dept. of Geography |
| University of Heidelberg, Germany |
| |
| Internet: emes@geo0.geog.uni-heidelberg.de |
*************************************************