Browse Source
When connected to a server via ssh, and the server doesn't have the
proper terminfo, tmux will fail with 'unsupported terminal' errors.
These errors are not surfaced by the scripts, e.g. details, start,
stop, so they result in either silent failures or don't work at all.
e.g. `./mcserver details` on my server showed 0% CPU, 0% Memory,
and STOPPED for the server status when the server was
actually running. This was because the tmux calls to get
this info failed.
The root cause of this was that I was connected to my server
via kitty, a terminal emulator that my server did not have
terminfo for.
This can be resolved via running `infocmp -x xterm-kitty | ssh
YOUR-SERVER -- tic -x -` and replacing `xterm-kitty` with whatever
is appropriate, or by setting TERM=xterm-256color in the ssh config,
but that is not obvious to do when presented with silent failures.
This commit sets TERM=screen for all non-interactive tmux calls,
which resolves the issue. Note that the `console` command does not
set this, as that is an interactive shell, and the user's terminfo
should be passed.
pull/4860/head
6 changed files with 15 additions and 15 deletions
Loading…
Reference in new issue