Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

CentOS 6.0 comes with the ability to set its TERM to screen-256color. It doesn't work in CentOS 5.7, though.

How can you get CentOS 5.7 to support screen-256color?

share|improve this question

2 Answers 2

Is xterm-256color available? I've not used CentOS much, but the xterm one has been around for a while.

share|improve this answer
    
It is available, but it doesn't do what I need it to do. htop crashes while using xterm-256color inside of tmux. –  Neil Feb 28 '12 at 23:26

If you have a CentOS 6 box handy, you should be able to get the source of the terminfo file for screen-256color and then compile it on the CentOS 5 box.

Take a look at:

http://tldp.org/HOWTO/Text-Terminal-HOWTO-16.html

I haven't tried it, but something like this:

On the CentOS 6: infocmp screen-256color > /tmp/screen-256color.terminfo, then get the output file to the CentOS 5 box. On the CentOS 5 box, tic screen-256color.terminfo. From the man page, as root, that should place the compiled terminfo file into /usr/share/terminfo.

Of course, read documentation and man pages, etc.

share|improve this answer
    
Just an FYI: On one of my boxes, the permissions got messed up for /usr/share/terminfo/s/screen-256color; it was only readable by root. A simple chmod a+r /usr/share/terminfo/s/screen-256color fixed the problem. –  The Doctor What Mar 15 '12 at 18:12
    
Oh, also: This works on any terminfo based unix system. Though the directory it writes to may be different. –  The Doctor What Mar 15 '12 at 18:13
    
You can do it all in one command if you have SSH access between the two. On the CentOS 5 machine, run tic <(ssh CENTOS6MACHINE infocmp screen-256color), where CENTOS6MACHINE is the hostname of your CentOS 6 machine. This will place it in the system-wide database if run as root, but if run as a normal user will put it in the right place in your home directory. –  Zanchey Apr 2 at 1:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.