New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker container set $TERM to xterm which cause some terminal editor feature not work. #42323
Comments
If we change the CLI to propagate |
Thank you, when use kitty with ssh, i found it set $TERM env automatically |
@AkihiroSuda Why does |
I see the change you linked to was made as part of #163 to fix #18 looks like that may have been even before the repository was open source (so slightly before I got involved). (funny, I do see that an earlier commit on the same PR set it to the value from the host 50bee2f - my best guess here would be to keep a consistent value, and to not (by default) leak information/configuration from the client environment into the container configuration. |
This is supported by xterm, foot, ghostty, iterm2 and perhaps a few other terminals. It serves a similar purpose to querying `terminfo(5)` capabilities from the filesystem, but with the following advantages: * Doesn't require a terminfo(5) entry (or database) to be installed * Doesn't require linking to libtinfo (or reimplementing parts of it) * Works reliably over SSH * Works reliably (in principle, at least) when spoofing `$TERM`, as is done automatically in some contexts (e.g. Docker) See also: * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html * https://codeberg.org/dnkl/foot/src/commit/a1ac37e771edf9fe907ee09dbec0e90d447679e1/doc/foot-ctlseqs.7.scd#L756-L757 * moby/moby#42323 * https://docs.docker.com/engine/reference/run/#environment-variables
Maybe check this link is the most easy way to undertand why this is a issue.
https://gitlab.com/craigbarnes/dte/-/issues/117#note_559774982
For a brief description, when use kitty (a terminal), it set $TERM env to
xterm-kitty
automatically, even on remote VPS. it very useful, especially for dte, a editor,
which use OSC 52 escape sequence feature.
but, when use with docker, it not work, $TERM always is term.
Describe the solution you'd like
set correct $TERM when use with docker.(that is, same as current $TERM)
e.g. when run following docker command within kitty
It have to run like this to make dte editor works.
The text was updated successfully, but these errors were encountered: