I've written a cool Python script that uses
curses to display colored text. When I SSH to the pi from my Mac, the terminal emulator is
xterm-256color and everything looks great. However I can not get the script to run properly on the 5" HDMI display that is connected directly to the pi.
At the command line:
$ echo $TERM linux
I have already tried:
sudo update-alternatives –config x-terminal-emulator
...and that menu still shows my selection as
xterm however this has no effect, even after restart, on
echo $TERM or the actual display behavior.
I have also tried including this in my Python script (against all stackexchange recommendations not to...):
os.environ['TERM'] = 'xterm-256color'
...and in this case a few of the curses commands work, but clearly some escape codes are cross-wired and there are some unexpected results (some text is blinking instead of displaying green, etc)
Finally, I tried just running
xterm at the command line:
xterm: Xt error: Can't open display: xterm: DISPLAY is not set
So how can I permanently set
xterm-256color as my terminal application for the connected HDMI monitor? Or, at least upgrade
LXTerminal to 256 colors?