Xterm 256 colors

I mainly use one of my raspberry pi headlessly.
So, I’m using putty from one laptop to connect to it with ssh.
Everything works fine but I want to add some colours… and here is the issue:
my $TERM variable is only xterm and when I look at the documentation they say that we can check this using a command such as infocmp:

infocmp | grep colors
colors#256 , cols#80, it#8, lines#24, pairs#256,

I only get

colors #8, cols#80, it#8, lines#24, pairs#64,

Many sites discourage changing the TERM variable but I don’t find anything how to force it to 256 colours in a correct way.

I’ve updated putty to the last version and I tried many possible configurations but it’s still the same…

Do you have such a behavior? What can I do/check ?

It is not the server side you should be looking at but the computer you use to connect.

PuTTY is mainly a windows application and this forum does not support Windows.

This snip is from a RPI3 running my searx.engine

$ ssh searx.net.nix.dk
Last login: Mon Feb  7 18:17:09 2022
fh@piweb:~ $ infocmp | grep colors
xterm-256color|xterm with 256 colors,
	colors#0x100, cols#80, it#8, lines#24, pairs#0x10000,

To verify your claims, I use my other rpi to ssh to the first one. And you’re correct I get a correct xterm value: xterm-256color

I will do some more tests on the laptop side and tell here if I find the issue (maybe it can help others)

Finally it was easier than I thought. The problem comes from PuTTY, as @linux-aarhus said, but you can’t see the variable linked to the terminal settings when you have a session already registered and opened.

In the Data category from Connection section, check you have set Terminal-type string to xterm-256color (as show below)


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.