#!/bin/sh
BIN=$("$PYTHONEXE" -c 'import os; import KCore.Dist as Dist; p = Dist.getLibPath(); print(os.path.join(os.path.dirname(p), "bin"))')
APP="$BIN/appCassiopee"

export MPIRUN=0

if command -v xdpyinfo >/dev/null 2>&1 && xdpyinfo | grep -q VNC; then
    exec vglrun "$APP" "$@"
fi

exec "$APP" "$@"
