diff --git a/host-shell.sh b/host-shell.sh index 129a6d2..da5bc02 100755 --- a/host-shell.sh +++ b/host-shell.sh @@ -15,7 +15,10 @@ # controlling terminal, tools that open /dev/tty break). script(1) allocates a # second, host-side PTY for the shell and relays through the forwarded one; # util-linux >= 2.35 also passes window-size changes along. -exec flatpak-spawn --host /bin/sh -c ' +# flatpak-spawn --host does not forward the caller's environment: without +# --env the host shell starts with no TERM at all (login scripts then fail +# in tput and in integer tests on the empty LINES/COLUMNS). +exec flatpak-spawn --host --env=TERM="${TERM:-xterm-256color}" --env=COLORTERM=truecolor /bin/sh -c ' shell="$(getent passwd "$(id -un)" | cut -d: -f7)" [ -x "$shell" ] || shell=/bin/sh export SHELL="$shell"