fix(console): pass TERM/COLORTERM through flatpak-spawn --host
Build and Publish HeiniRemote Agent Flatpak / build (push) Successful in 7m16s
Build and Publish HeiniRemote Agent Flatpak / build (push) Successful in 7m16s
flatpak-spawn --host does not forward the caller's environment; the host login shell started without TERM (tput errors, integer test on empty LINES/COLUMNS in the profile scripts). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jkHZhr7ZzHGGuE2bJQmGa
This commit is contained in:
1 parent
b33494d399
commit
981eb11b6d
1 file changed
+4
-1
+4
-1
@@ -15,7 +15,10 @@
|
|||||||
# controlling terminal, tools that open /dev/tty break). script(1) allocates a
|
# 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;
|
# second, host-side PTY for the shell and relays through the forwarded one;
|
||||||
# util-linux >= 2.35 also passes window-size changes along.
|
# 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)"
|
shell="$(getent passwd "$(id -un)" | cut -d: -f7)"
|
||||||
[ -x "$shell" ] || shell=/bin/sh
|
[ -x "$shell" ] || shell=/bin/sh
|
||||||
export SHELL="$shell"
|
export SHELL="$shell"
|
||||||
|
|||||||
Reference in new issue
Block a user