Inconsistent value of $TERM in Fingerterm

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:

Fingerterm sets $TERM to “xterm” and not “xterm-256color”, although programs do show 256 colors when using the workaround below.

Thus, Fingerterm seems to incorrectly advertise its capabilities.

STEPS TO REPRODUCE:

  1. open fingerterm
  2. echo "$TERM" returns “xterm”
  3. for fg_color in {0..$(tput colors)}; do echo -n "$(tput setaf $fg_color)####($fg_color) " done echo $(tput sgr0)
  4. export TERM=xterm-256color
  5. repeat 3) again

EXPECTED RESULT:

Support for 256 colors by default (without Step 4) )

ACTUAL RESULT:

Step 3 shows only 8 colors
Step 5 shows 256 colors

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:

1 Like

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/

You are, of course, right.
And as @nephros has guessed correctly, my fundamental problem here aren’t the different values.
I’ve edited my bug report to make that clear.

I just wanted to see the same 256 color support as in all my other terminals. And fingerterm does support 256 colors (tested with various test scripts, colorful prompts, …), but sets TERM so that all the programs can’t make use of that color support.

(Fingerterm doesn’t support 24-bit colors, btw. But that’s not that important for now.)

I am afraid this way you made the bug report very unclear. Imagine someone coming to this topic only now - would the replies make any sense to them? I suggest you to revert your edit, close this topic and open a new one. Both the original and edited version are deserve to be answered, each separately.