#!/bin/bash . `dirname $0`/env.sh #sometimes, particular for users only used through su, /run/user/XXXX is not created #to solve, run as sudoer #sudo loginctl enable-linger 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 &