Setting $TERM for gnu screen

So I have screen compiled with 256 colors, running on Konsole in 256 color mode. If start screen, the TERM is set to "screen". If I manually export the TERM to screen-256color everything works beautifully.

I have two questions. The first is why screen is setting the TERM to "screen" instead of "screen-256color" when it supports this? The second is, if I have the following line in my .screenrc file

term    screen-256color

why is screen still not setting my term?

Additional information: I'm running Screen version 4.00.03jw4 (FAU) 2-May-06 on Kubuntu Jaunty amd64


Screen always sets TERM to "screen" by default. Nevertheless, you should realize that a TERM=screen still supports colors.

I tested adding "term screen-256color" to my ~/.screenrc and it does set the TERM to "screen-256color" for me (Screen version 4.00.03 (FAU) 23-Oct-06). Is it possible that screen is looking in the wrong place for your .screenrc file?

You can also try launching screen as follows:

screen -T screen-256color

See if that works.


The issue actually turned out to be some conflicting screen-profiles that were installed on my machine. Although they sourced my local .screenrc, they prevented me from setting the term. Disabling the use of profiles (I renamed the symlink ~/.screen-profiles to something else) caused screen to read the term as set in my .screenrc file.