I have a problem with gnu screen.

Computer 1:

open terminal
$ printenv TERM
xterm-color
$ screen
$ printenv TERM
screen

Computer 2:

open terminal
$ printenv TERM
xterm-color
$ screen
$ printenv TERM
xterm-color

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?

link|improve this question
feedback

1 Answer

up vote 1 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
screen
$ echo $TERM
xterm-256color
$ grep -n TERM ~/.bashrc
1:echo $TERM >> /tmp/bashrc.out
33:export TERM=xterm-256color
link|improve this answer
Thank you so much!! – gdelfino Jul 22 '10 at 9:16
feedback

Your Answer

 
or
required, but never shown

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