I am mostly using Putty and until now I have been using it with xterm setting for terminal, which I changed to xterm-256color. This works great (I mean in vim, since I am not aware of any other terminal app.).
The problems started when I run screen in xterm-256color terminal - the terminal window size get resized (probably to 80 columns or whatever is the default settings) and lost the colors. This seemed easy to fix (in theory) by setting up .screenrc locally to:
Code: Select all
term screen-256color
width 120 50Code: Select all
Your termcap does not specify how to change the terminal's width to 120.Then I found there is terminfo for putty-256color, so I tried that. Surprisingly, this works with screen well (in terms of window size), I did not have to specify the size at all and it preserves actual window size well. So only:
Code: Select all
term screen-256colorEDIT: Now I found out, that some things stopped working. E.g. window title of terminal window is no longer updated with progress when running emerge - I guess it is because emerge does not know putty. So I would really like to stay with xterm-256color.
There was only one small detail, I had to change my .bashrc to properly set up window title also for putty type terminals and also add this one into /etc/DIR_COLORS database for dircolors to properly set LS_COLORS.
Now I wonder, what might the be problem with xterm-256color? Why screen cannot change its size, when for putty type (or normal xterm type with basic colors) it works?
EDIT2: After a while, I figured out how to do it in a better way. I have put back xterm-256color into putty terminal specification and in .bashrc defined alias:
Code: Select all
alias screen="TERM=xterm screen"