summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer
diff options
context:
space:
mode:
authorkuesji koesnu <kuesji@koesnu.com>2021-05-02 17:37:08 +0300
committerGitHub <noreply@github.com>2021-05-02 17:37:08 +0300
commitec9914efad9e4ba46d49337b473b79bcdfd20d1f (patch)
tree455367830c2fb84e9cc8dc5738dc1b6f3b467f20 /src/SMAPI.Installer
parent28c5cb79d4ca671881c54f473a9cfb6235298099 (diff)
downloadSMAPI-ec9914efad9e4ba46d49337b473b79bcdfd20d1f.tar.gz
SMAPI-ec9914efad9e4ba46d49337b473b79bcdfd20d1f.tar.bz2
SMAPI-ec9914efad9e4ba46d49337b473b79bcdfd20d1f.zip
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 )
Diffstat (limited to 'src/SMAPI.Installer')
-rw-r--r--src/SMAPI.Installer/assets/unix-launcher.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh
index 93bf58d8..0046e716 100644
--- a/src/SMAPI.Installer/assets/unix-launcher.sh
+++ b/src/SMAPI.Installer/assets/unix-launcher.sh
@@ -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