runSlicer.sh 437 B

123456789101112131415
  1. #!/bin/bash
  2. . `dirname $0`/env.sh
  3. #sometimes, particular for users only used through su, /run/user/XXXX is not created
  4. #to solve, run as sudoer
  5. #sudo loginctl enable-linger <USERNAME>
  6. export DISPLAY=:$DISPLAYID
  7. TEMP=~/.xpra/temp.log
  8. #make sure xpra is running a virtual buffer at DISPLAY
  9. xpra info $DISPLAY > $TEMP || xpra start $DISPLAY;
  10. nohup $SLICER/Slicer --no-main-window --python-script $1 0<&- &> $HOME/logs/runSlicer.log &