Red Hat Bugzilla – Bug 160354
backspace key in vim running from xterm returns ^?
Last modified: 2007-11-30 17:11:07 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4
Description of problem:
When I run vim from the xterminal, anytime I hit the backspace key I get ^? on the screen instead of backspacing. The delete key will delete the current character; if there is no character under the cursor it acts like a backspace key. When I ran vim from gnome-terminal, I do not have this problem. "tput kbs|cat -v ;echo" returns ^?, like it should.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. start xterm
2. run vi
3. in insert mode, hit <backspace> key
Actual Results: screen displays ^?
Expected Results: the previous character should have been deleted
I verified this problem with a clean install of FC4.
In addition, the problem also exists when ssh'ing into a different box and
For example, I'm on a FC4 box, with an xterm open, and I ssh
user@another_FC4_box.mydomain.foo, and I start editing a doc in vi, the same
Same problem here, with a fresh new install. Sounds like an inputrc problem.
You can add the following line to the file .Xdefaults
... or wait for someone to fix bug 155538
Adding to .Xdefaults didn't work for me. Nevertheless, this is working here :
*ttyModes: erase ^?
(as explained in 155538. Thank you Nick.
adding that line as referenced in the previous post also fixed the problem here
too (both at the machine, and over ssh). Perhaps this should be patched, and an
update for xterm should be released.
(In reply to comment #5)
> Adding to .Xdefaults didn't work for me. Nevertheless, this is working here :
.Xdefaults hasn't been supported by XFree86 or Xorg for 5 years or so.
The correct file is ~/.Xresources
This is also problem in man find function (/).
In vim :help fixdel is how to fix that either for vim only or this note:
"Note about Linux: By default the backspace key
produces CTRL-?, which is wrong. You can fix it by
putting this line in your rc.local: >
echo "keycode 14 = BackSpace" | loadkeys"
Created attachment 116272 [details]
patched XTerm file
Comment on attachment 116272 [details]
patched XTerm file
path should be /usr/X11R6/lib/X11/app-defaults/
*** Bug 162549 has been marked as a duplicate of this bug. ***
I'm also seeing this bug on a FC3->FC4 upgrade.
The xterm*ttyModes: erase ^?
workaround fixes it.
*** Bug 163812 has been marked as a duplicate of this bug. ***
The problem is NOT xterm, is that the /etc/termcap entry for xterm is not
synchronized with terminfo entry (look at the "kb" value).
The fix is to replace "kb=^H" with "kb=^?" in /etc/termcap, for the
"xterm-basic" entry (which is included by xterm, through xterm-old).
To verify: "infocmp xterm | grep kbs" displays "kbs=\177".
Probably this bug should be assigned to the termcap maintainer.
(Please make sure that the xterm-256color entry is also fixed)
To comment #15:
Yes, you are right.
This is a bug in termcap. I have received this as Bug #166702.
Fixed in termcap 5.4 Rel.5.
*** This bug has been marked as a duplicate of 155538 ***
I think this actually was a dup of Bug #166702 (termcap) and not Bug #155538
The new package from #166702 has completely resolved the issue for me on fc4.
From User-Agent: XML-RPC
xterm-205-1.FC4 has been pushed for FC4, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.