Active Topics

 



Notices


Reply
Thread Tools
ginggs's Avatar
Posts: 306 | Thanked: 582 times | Joined on Mar 2012
#1
I noticed recently on my N900 and N9 that attempting to run nano over ssh resulted in the following error:
Code:
Error opening terminal: xterm-256color.
and mc started in black & white.

I found that in Ubuntu 15.10 the TERM environment variable now defaults to xterm-256color instead of xterm-color.
Apparently this changed in a recent upgrade to Apple OS X as well.
This environment variable is passed through when ssh-ing into another machine.

Both Maemo and Harmattan have an old version of ncurses-base (5.7+20081213) which includes the file /etc/terminfo/x/xterm-color but not /etc/terminfo/x/xterm-256color.

One solution is to set the TERM environment variable after ssh-ing into the device:
Code:
export TERM=xterm-color
Another solution is to copy the file /lib/terminfo/x/xterm-256color from a recent Debian or Ubuntu installation (or the attached xterm-256color.tar.gz from the Maemo package) to /etc/terminfo/x/ on the device.
Attached Files
File Type: gz xterm-256color.tar.gz (1.0 KB, 119 views)

Last edited by ginggs; 2015-12-29 at 05:32.
 

The Following 3 Users Say Thank You to ginggs For This Useful Post:
ginggs's Avatar
Posts: 306 | Thanked: 582 times | Joined on Mar 2012
#2
The ncurses source package is here:
http://maemo.org/packages/source/vie...-1.maemo1+0m5/

You can see the following binary packages are built from it:
libncurses5
libncurses5-dbg
libncurses5-dev
libncursesw5
libncursesw5-dbg
libncursesw5-dev
ncurses-base

Strangely, if you build it locally you also end up with binary packages ncurses-bin and ncurses-term, but these packages don't seem to be available in the repository.
Ncurses-term contains xterm-256color and the full contents of the terminfo database (2000+ files). According to README.Debian, it "includes many strange and obsolete terminals.".

The changelog for ncurses 5.6+20080713-1 in Debian contains the following:
* Moving xterm-256color from ncurses-term to ncurses-base, thanks to Iustin
Pop <iusty@k1024.org> (Closes: #405602).
Unfortunately, Nokia appeared to have forked ncurses from Debian at version 5.4-3.osso1 in August 2006, and missed this fix.

Looking at the ncurses-base binary package:
http://maemo.org/packages/view/ncurses-base/
it is available in the Maemo 5 device root filesystem and the Maemo 5 device SSU repository. Maybe moving xterm-256color from ncurses-term to ncurses-base could be something for CSSU?
 

The Following 4 Users Say Thank You to ginggs For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:07.