source: trunk/packages/vizservers/start_viz.sh.in @ 1131

Last change on this file since 1131 was 1131, checked in by gah, 16 years ago

fixed start_vis not to copy files each invocation

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#! /bin/sh
2
3DISPLAY=:0
4export DISPLAY
5
6broadcast="192.168.200.255"
7render_dir="@prefix@"
8nanoscale_port=2000
9nanovis_port=2000
10pymol_port=2020
11
12# Build the name of the run directory. This is where nanoscale and the
13# visualization programs will reside.  The directory name is the same as the
14# render directory.
15dir="/tmp/`basename $render_dir`"
16
17PATH=${dir}/bin:$PATH
18LD_LIBRARY_PATH=${dir}/lib:$LD_LIBRARY_PATH
19PYMOL_PATH=${dir}/lib/pymol
20
21export PATH LD_LIBRARY_PATH PYMOL_PATH
22
23nanoscale="${dir}/bin/nanoscale -b $nanoscale_port -s $broadcast"
24nanovis="${dir}/bin/nanovis -p ${dir}/lib/shaders:${dir}/lib/resources"
25pymolproxy="${dir}/bin/pymolproxy ${dir}/bin/pymol -p -q -i -x -X 0 -Y 0"
26
27# Copy from render directory if the run copy doesn't already exist.
28# Otherwise use what's there.  This means that successive invocations
29# of nanoscale won't create their own run directories (only the first
30# one will).
31
32if test -f "$dir" ; then
33  echo "Reusing previously installed version from $render_dir"
34else
35  echo "Copying rappture from $render_dir"
36  mkdir -p $dir
37  tar -C ${render_dir} -clf - . | tar -C $dir -xpf -
38fi
39
40cd ${dir}
41
42# Don't let nanoscale run and the visualization servers run away.
43# Limit cpu time to 20 minutes.
44minutes=20
45ulimit -t $(expr ${minutes} \* 60 )
46
47echo "$nanoscale -l $nanovis_port -c \"$nanovis\" -l $pymol_port -c \"$pymolproxy\""
48$nanoscale -l $nanovis_port -c "$nanovis" -l $pymol_port -c "$pymolproxy"
49
Note: See TracBrowser for help on using the repository browser.