From 8cfada7e8bf912114c411e88fba55bbc1d06198b Mon Sep 17 00:00:00 2001 From: lqdev Date: Fri, 9 Nov 2018 18:17:13 +0100 Subject: [PATCH 1/2] Made the unix launcher compatible with any shell --- src/SMAPI.Installer/unix-launcher.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SMAPI.Installer/unix-launcher.sh b/src/SMAPI.Installer/unix-launcher.sh index b64c021c..bf2cbb9c 100644 --- a/src/SMAPI.Installer/unix-launcher.sh +++ b/src/SMAPI.Installer/unix-launcher.sh @@ -71,12 +71,12 @@ else if [[ "$(readlink -e $(which x-terminal-emulator))" == *"/terminator" ]]; then terminator -e "$LAUNCHER" else - x-terminal-emulator -e "$LAUNCHER" + x-terminal-emulator -e "sh -c 'TERM=xterm $LAUNCHER'" fi elif $COMMAND xfce4-terminal 2>/dev/null; then - xfce4-terminal -e "env TERM=xterm; $LAUNCHER" + xfce4-terminal -e "sh -c 'TERM=xterm $LAUNCHER'" elif $COMMAND gnome-terminal 2>/dev/null; then - gnome-terminal -e "env TERM=xterm; $LAUNCHER" + gnome-terminal -e "sh -c 'TERM=xterm $LAUNCHER'" elif $COMMAND konsole 2>/dev/null; then konsole -p Environment=TERM=xterm -e "$LAUNCHER" elif $COMMAND terminal 2>/dev/null; then From 76f1a37c166327d41646d797191101c8446376d8 Mon Sep 17 00:00:00 2001 From: lqdev Date: Fri, 9 Nov 2018 22:27:20 +0100 Subject: [PATCH 2/2] Added compatibility with even more terminals --- src/SMAPI.Installer/unix-launcher.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SMAPI.Installer/unix-launcher.sh b/src/SMAPI.Installer/unix-launcher.sh index bf2cbb9c..3c332472 100644 --- a/src/SMAPI.Installer/unix-launcher.sh +++ b/src/SMAPI.Installer/unix-launcher.sh @@ -69,7 +69,7 @@ else # `man terminator`), which causes an "unable to find shell" error. If x-terminal-emulator # is mapped to Terminator, invoke it directly instead. if [[ "$(readlink -e $(which x-terminal-emulator))" == *"/terminator" ]]; then - terminator -e "$LAUNCHER" + terminator -e "sh -c 'TERM=xterm $LAUNCHER'" else x-terminal-emulator -e "sh -c 'TERM=xterm $LAUNCHER'" fi @@ -80,9 +80,9 @@ else elif $COMMAND konsole 2>/dev/null; then konsole -p Environment=TERM=xterm -e "$LAUNCHER" elif $COMMAND terminal 2>/dev/null; then - terminal -e "$LAUNCHER" + terminal -e "sh -c 'TERM=xterm $LAUNCHER'" else - $LAUNCHER + sh -c 'TERM=xterm $LAUNCHER' fi # some Linux users get error 127 (command not found) from the above block, even though