Browse Source

Updating runSlicer to run with a configuration file

Andrej Studen/Merlin 5 years ago
parent
commit
2fea6f5bc3
3 changed files with 23 additions and 0 deletions
  1. 8 0
      slicerScripts/HOWTO
  2. 4 0
      slicerScripts/env.sh.template
  3. 11 0
      slicerScripts/runSlicer.sh

+ 8 - 0
slicerScripts/HOWTO

@@ -0,0 +1,8 @@
+Copy env.sh.template to env.sh and update variables.
+Usually it is OK to leave FUSER at preset value as it
+locates the Slicer binary, which is not in each user's home.
+
+DISPLAYID should not clash on a machine. Best to set them to
+a unique values. Currently on merlin:
+110 tomcat8
+210 andrej

+ 4 - 0
slicerScripts/env.sh.template

@@ -0,0 +1,4 @@
+UHOME=/home/andrej
+SLICER=$UHOME/software/install/Slicer
+DISPLAYID=210
+

+ 11 - 0
slicerScripts/runSlicer.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+. `dirname $0`/env.sh
+
+export DISPLAY=:$DISPLAYID
+TEMP=~/.xpra/temp.log
+#make sure xpra is running a virtual buffer at DISPLAY
+
+xpra info $DISPLAY > $TEMP || xpra start $DISPLAY;
+
+nohup $SLICER/Slicer --no-main-window --python-script $1  0<&- &> $HOME/logs/runSlicer.log &