Subscribe via RSS
administration c# cocoa coding EasyTAG linux Mac OS X opensolaris OpenVPN Time Machine virtualization windows xcode zfs

ssh and Lion’s xterm-256color terminfo

When you ssh from your shiny Mac running new shiny Mac OS X 10.7 (aka. Lion) into another Unix box running e.g. Linux, Solaris or probably BSD you are likely to encounter an error like the following one when you use terminal based programs like less, nano and alike :

Telling you that it can not work with your Terminal because it doesn't know anything about "xterm-256color".

The root cause is that with 10.7 apple set the environment variable "TERM=xterm-256color" probably to promote some new capatibilites of Terminal.app. This variable is then on the other unixes interpreted from terminal programs using the Terminfo library. However they do not have the proper definition for "xterm-256color" in place, so we have to add it.

If you google this error, it will yield a bunch of results with most suggesting copying over the complete terminfo folder to your mac. While this will probably solve the problem, because the missing terminfo file is then available, I consider this an absolute non-optimal approach as it could break some stuff with existing terminfo files getting overwritten.
 

I rather recommend using the less invasive method of just copying over the needed terminfo file form your mac.

(Open)Solaris :

ssh SolarisMachine
pfexec scp MacUserName@MacComputerNameOrIP:/usr/share/terminfo/78/xterm-256color /usr/share/lib/terminfo/x
pfexec chown root:bin /usr/share/lib/terminfo/x/xterm-256color

 

Linux

ssh LinuxMachine
sudo scp MacUserName@MacComputerNameOrIP:/usr/share/terminfo/78/xterm-256color /lib/terminfo/x
sudo ln -s /lib/terminfo/x/xterm-256color /usr/share/terminfo/x/

Please note that the above terminfo location (/lib/terminfo) was for one of my Ubuntu LTS 10.04 servers, you may have to adjust this if you use another distribution …

 

Now everything runs for me as smooth as it should.

8 Responses to “ssh and Lion’s xterm-256color terminfo”



Your comment :
Name *

Email*
(will not be published)

Website