launcher strict sandbox fix on linux

i added a check for is found terminal is executable.
game will launch with standart exec if found terminal is not exist or executable.

( fix for issue #775 )
This commit is contained in:
kuesji koesnu 2021-05-02 17:37:08 +03:00 committed by GitHub
parent 28c5cb79d4
commit ec9914efad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -80,8 +80,14 @@ else
export LAUNCHTERM="$(basename "$(readlink -f $(COMMAND x-terminal-emulator))")"
fi
# run in selected terminal and account for quirks
case $LAUNCHTERM in
if [ ! -x $LAUNCHTERM ]; then
echo "looks like found no terminal available for launch. maybe in sandbox or misconfigured system? fallbacking to execution without terminal"
export TERM="xterm"
exec $LAUNCHER $@
else
# run in selected terminal and account for quirks
case $LAUNCHTERM in
terminal|termite)
# LAUNCHTERM consumes only one argument after -e
# options containing space characters are unsupported
@ -110,5 +116,6 @@ else
if [ $? -eq 127 ]; then
exec $LAUNCHER --no-terminal "$@"
fi
esac
esac
fi
fi