diff --git a/scripts/core/sxmo_terminal.sh b/scripts/core/sxmo_terminal.sh index 18e2212..076749a 100755 --- a/scripts/core/sxmo_terminal.sh +++ b/scripts/core/sxmo_terminal.sh @@ -11,4 +11,8 @@ else set -- st "$@" fi -exec "$@" +if [ -z "$*" ]; then + echo "sxmo_terminal.sh called in TERMMODE without any arguments (returning, nothing to do)" >&2 +else + exec "$@" +fi diff --git a/scripts/modem/sxmo_modemtext.sh b/scripts/modem/sxmo_modemtext.sh index 6271866..863494c 100755 --- a/scripts/modem/sxmo_modemtext.sh +++ b/scripts/modem/sxmo_modemtext.sh @@ -4,6 +4,8 @@ # shellcheck source=scripts/core/sxmo_common.sh . "$(dirname "$0")/sxmo_common.sh" +TERMMODE=$([ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && echo "true") + err() { echo "$1">&2 echo "$1" | dmenu -c -l 10