Screen missing terminfo entries for 'xterm'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ncurses (Ubuntu) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: screen
Popping around on the internet, I discovered that there is a pretty well known problem, namely backspace not working correctly in many cases (wuff wuff!). The standard solution has been some form of TERM hackery, doing something like aliasing:
TERM=screen screen
for the screen command. This seems to work be simply defeating the term lookup on most systems, so that screen loads the terminfo for 'screen' only. The description of how screen finds it's terminfo is here ( http://
When screen tries to figure out a terminal name for itself, it first looks for an entry named screen.term, where term is the contents of your $TERM variable. If no such entry exists, screen tries `screen' (or `screen-w', if the terminal is wide (132 cols or more)). If even this entry cannot be found, `vt100' is used as a substitute.
Maybe this is a terminfo bug?
Well, I found some more information. I thought I might be able to fix the problem by fixing the term, but I don't think that's involved. Here's what I did.
I symlinked the "screen" terminfo files to /usr/share/ terminfo/ screen. xterm and screen.xterm-color, to no avail. Also tried /lib/terminfo and even symlinking them into /etc/terminfo. None of these options worked with a TERM of xterm-color. So, I tried using the -T option on screen to manually set the term to 'screen.xterm' or 'xterm' (instead of TERM=xterm, for example) and that didn't work either.
My terminfo folders look like this: terminfo/ | grep screen s/screen s/screen- bce s/screen- s s/screen- w s/screen. xterm-color terminfo/ s/screen terminfo/ s/screen- 256color- s terminfo/ s/screen- bce terminfo/ s/screen. teraterm terminfo/ s/screen- 256color- bce terminfo/ s/screen- 16color terminfo/ s/screen. xterm-new terminfo/ s/screen- s terminfo/ s/screen- 16color- bce terminfo/ s/screen- w terminfo/ s/screen. xterm-xfree86 terminfo/ s/screen. xterm terminfo/ s/screen2 terminfo/ s/screen- 16color- bce-s terminfo/ s/screen. linux terminfo/ s/screen. xterm-r6 terminfo/ s/screen- 256color terminfo/ s/screen- 256color- bce-s terminfo/ s/screen3 terminfo/ s/screen- 16color- s terminfo/ s/screen. xterm-color
find /lib/terminfo/ /usr/share/
/lib/terminfo/
/lib/terminfo/
/lib/terminfo/
/lib/terminfo/
/lib/terminfo/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
I added a few symlinks as tests.
Currently, it seems like this is a terminfo issue, but I can't fix it using any of the things I know about terminfo.
Here's the working (TERM=xterm) dumped terminfo file: %dB:LE= \E[%dD: RI=\E[% dC:UP=\ E[%dA:bs: bt=\E[Z: \ J:ce=\E[ K:cl=\E[ H\E[J:cm= \E[%i%d; %dH:ct= \E[3g:\ nd=\E[C: pt:rc=\ E8:rs=\ Ec:sc=\ E7:st=\ EH:up=\ EM:\ bl=^G:cr= ^M:it#8: ho=\E[H: nw=\EE: ta=^I:is= \E)0:\ co#275: am:xn:xv:LP:sr=\EM:al= \E[L:AL= \E[%dL: \ %i%d;%dr: dl=\E[M: DL=\E[% dM:dc=\ E[P:DC= \E[%dP: \ 4h:ei=\ E[4l:mi: IC=\E[% d@:ks=\ E[?1h\E= :\ ?1l\E>: vi=\E[? 25l:ve= \E[34h\ E[?25h: vs=\E[34l: \ ?1049h: te=\E[? 1049l:us= \E[4m:ue= \E[24m: so=\E[3m: \ 23m:mb= \E[5m:md= \E[1m:mr= \E[7m:me= \E[m:ms: \ pa#64:AF= \E[3%dm: AB=\E[4% dm:op=\ E[39;49m: AX:\ G0:as=\ E(0:ae= \E(B:\ 140aaffggjjkkll mmnnooppqqrrsst tuuvvwwxxyyzz{ {||}}~~ ..--++, ,hhII00: \ 5i:pf=\ E[4i:k0= \E[10~: k1=\EOP: k2=\EOQ: k3=\EOR: \ k5=\E[15~ :k6=\E[ 17~:k7= \E[18~: k8=\E[19~ :\ 20~:k;= \E[21~: F1=\E[23~ :F2=\E[ 24~:F3= \EO2P:\ F5=\EO2R: F6=\EO2S: F7=\E[15; 2~:F8=\ E[17;2~ :\ 18;2~:FA= \E[19;2~ :kb=:K2= \EOE:kB= \E[Z:\ 3;2~:*7= \E[1;2F: #2=\E[1; 2H:#3=\ E[2;2~: #4=\E[1; 2D:\ 6;2~:%e= \E[5;2~ :%i=\E[ 1;2C:kh= \E[1~:@ 1=\E[1~ :\ 4~:@7=\ E[4~:kN= \E[6~:kP= \E[5~:kI= \E[2~:kD= \E[3~:\ kd=\EOB: kr=\EOC: kl=\EOD: km:
SC|screen.xterm|VT 100/ANSI X3.64 virtual terminal:\
:DO=\E[
:cd=\E[
:do=^J:
:le=^H:
:li#66:
:cs=\E[
:im=\E[
:ke=\E[
:ti=\E[
:se=\E[
:Co#8:
:vb=\Eg:
:ac=\140\
:po=\E[
:k4=\EOS:
:k9=\E[
:F4=\EO2Q:
:F9=\E[
:*4=\E[
:%c=\E[
:kH=\E[
:ku=\EOA:
Here's the non-working version : xterm-color| VT 100/ANSI X3.64 virtual terminal:\ %dB:LE= \E[%dD: RI=\E[% dC:UP=\ E[%dA:bs: bt=\E[Z: \ J:ce=\E[ K:cl=\E[ H\E[J:cm= \E[%i%d; %dH...
SC|screen.
:DO=\E[
:cd=\E[