Inconsistent value of $TERM in Fingerterm and SSH

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.2 and 4.1
HARDWARE (XA2, X10, X10 II, …): Xperia X and X10 II
REGRESSION: (compared to previous public release: Yes, No, ?): No

DESCRIPTION:

Inconsistent value of $TERM in Fingerterm and SSH shell
This leads to an inconsistent use of colors in different terminals.

STEPS TO REPRODUCE:

A1) open fingerterm
A2) echo "$TERM" returns “xterm”

B1) ssh into the device
B2) echo "$TERM" returns “xterm-256color”

EXPECTED RESULT:

$TERM has the same value

ACTUAL RESULT:

$TERM has different values

ADDITIONAL INFORMATION - Workaround:

Add the following lines to ~/.config/FingerTerm :

[terminal]
envVarTERM=xterm-256color

and restart Fingerterm/open new window.

Btw, xterm is hardcoded in fingerterm:

The purpose of the TERM variable is to describe the terminal (emulator) in use, in order to determine the available terminal features. Various terminals offer various features in various ways. Fingerterm declares that in this sense it matches XTerm by setting TERM=xterm. The value of TERM in case of SSH connection matches the value of TERM on the side where ssh is invoked. Try logging to your device with TERM=vt100 ssh ... and see how TERM follows what’s on the invoking side.

5 Likes

Is your issue that these variables are different? In this case, as @martyone explains, that is as-designed and normal behaviour.

Or is your issue that fingerterm should declare itself as a multicolor xterm? Does fingerterm support all the features that are required for TERM=xterm-256color? Maybe it shoud it set COLORTERM instead as suggested on [1]?
Running the test script from [2] seems the output is fine.

[1] https://gist.github.com/XVilka/8346728
[2] https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/