Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with gnu screen.

Computer 1:

open terminal
$ printenv TERM
$ screen
$ printenv TERM

Computer 2:

open terminal
$ printenv TERM
$ screen
$ printenv TERM

Both computers are running Mac OS X 10.6.4, screen version 4.00.03, and similar configuration.

According to screen its man page:

In each window's environment screen opens, the $TERM variable is set to "screen" by default. But when no description for "screen" is installed in the local termcap or terminfo data base, you set $TERM to - say - "vt100".

In both computers I have the terminfo files for "screen" at /opt/local/share/terminfo/73

Even when I do screen -T screen I still get the $TERM variable set as xterm-color

Any ideas?

share|improve this question
up vote 2 down vote accepted

It's most likely being overwritten in ~/.bashrc. That's the case on my system. I added the following line to the top of my ~/.bashrc:

echo $TERM >> /tmp/bashrc.out

then started screen and did this:

$ cat /tmp/bashrc.out
$ echo $TERM
$ grep -n TERM ~/.bashrc
1:echo $TERM >> /tmp/bashrc.out
33:export TERM=xterm-256color
share|improve this answer
Thank you so much!! – gdelfino Jul 22 '10 at 9:16

Your Answer


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.