We have a desktop app which runs in apptainer (batch_connect:template:vnc_container). When something goes wrong we always get this error `vncserver: command not found`.
This is not the real error but an error that happens in OOD’s clean_up function and distracts us from the real error.
clean_up () {
echo "Cleaning up..."
[[ -e "/data/leuven/355/vsc35586/.ondemand-quality/data/batch_connect/sys/desktop/output/2da0b388-5d2b-4bda-b2c8-075c72310e00/clean.sh" ]] && source "/data/leuven/355/vsc35586/.ondemand-quality/data/batch_connect/sys/desktop/output/2da0b388-5d2b-4bda-b2c8-075c72310e00/clean.sh"
module load
apptainer exec instance://b5470e7a-e9b1-4ae8-beee-1e4e6a10805c vncserver -list | awk '/^:/{system("kill -0 "$2" 2>/dev/null || apptainer exec instance://b5470e7a-e9b1-4ae8-beee-1e4e6a10805c vncserver -kill "$1)}'
[[ -n ${display} ]] && vncserver -kill :${display}
apptainer instance stop b5470e7a-e9b1-4ae8-beee-1e4e6a10805c
[[ ${SCRIPT_PID} ]] && pkill -P ${SCRIPT_PID} || :
pkill -P $$
exit ${1:-0}
}
In particular line [[ -n ${display} ]] && vncserver -kill :${display} fails: vncserver is only available in apptainer, not on the node.