Bug 91357
Summary: | bashrc breaks stty erase | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Marc MERLIN <marc_soft> |
Component: | setup | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED RAWHIDE | QA Contact: | Brock Organ <borgan> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | CC: | mw-u1, p.van.egdom, rvokal, twaugh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-12-08 19:32:31 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 98752 | ||
Bug Blocks: |
Description
Marc MERLIN
2003-05-21 20:33:01 UTC
I found that the problem is mostly because you have a nonstandard screenrc which generates ^H instead of ^?, and you try to account for that. IMO, this is the wrong way to do it, if that's the only reason you have the above code. You use this: # This makes screen treat backspaces '^?' as # deletes. There should be a fix in the code # for the way termcap inheritance works, # but I dont know where to put it, and this works. bindkey -d -k kb stuff "\010" Debian, and most other folks use that: bindkey -k kb stuff "\177" The second way is consistent and generates ^?. Your way works for screen run on the local machine, but if I run screen on a remote machine (not running RH), screen generates ^? (as it should), and your bashrc code changes stty erase to ^H, causing backspace not to work. Unless I missed something, I don't see why you're trying to support BS set to ^H when it's been abandonned in all of linux years ago. As it turns out, neither are correct. Distributions, in general, should not change the default backspace key binding in /etc/screenrc. Additionally, Screen ships with the backspace key defined as '^H' in its termcap and terminfo settings; Debian modifies these to '^?'. I am not sure if this might also be causing problems for you (and others) or not. I'll look into fixing screen as it ships with Red Hat Linux, but I consider it unlikely that this will fix compatibility problems with other distributions which ship with broken default settings. Packages which do not have the 'bindkey' entry in /etc/screenrc are (or will be) in rawhide shortly, and are also available from the URLs below. http://people.redhat.com/lhh/screen-3.9.15-9.i386.rpm http://people.redhat.com/lhh/screen-3.9.15-9.src.rpm The above packages will *not* fix inter-operating system conflicts caused by modified terminfo/termcap entries. Unfortunately, I still have reports that removing this bindkey line breaks some configurations, (though I have been unable to reproduce it myself). Thus, I will re-break screen for the time-being, and work on this after my vacation. You meight want to read http://www.ibb.net/~anne/keyboard.html The Debian Policy states that BS must send ^?, that is why ther terminfo entry is changed. If BS sends ^H, then C-h (as used eg. by Emacs) is not distinguishable from BS and it is difficult to explain users, why BS generates help, etc. I just don't understand why you are going through all that trouble to deal with the fact that screen ships with a broken default of setting BS to ^H Everyone else fixes this by doing the following: in /etc/screenrc: bindkey -k kb stuff "\177" in /etc/bashrc: don't muck with tput, just leave stty erase to ^? The current RH config (BS=^H in screen but ^? everywhere else) is not only complex, makes no sense to me, and doesn't work with escreen on a RH 9 machine to another RH 9 machine. Doing the above does fix the problem, and that's what other distros do AFAIK There is light at the end of the tunnel on this 3-year-old issue; screen-4.0.1. I've packaged it up and placed it on my web page. You can point 'yum' at: http://people.redhat.com/lhh/fedora/ or just download the packages directly: http://people.redhat.com/lhh/fedora/screen-4.0.1-0.1.i386.rpm http://people.redhat.com/lhh/fedora/screen-4.0.1-0.1.src.rpm Once you install this package, you need to comment out the 'stty erase `tput kbs`' from /etc/bashrc and /etc/zshrc. Screen should work as it did previously on Red Hat Linux, Red Hat Enterprise Linux, and Fedora Core - except that the backspace key is handled by the parent terminal's settings and inherited by Screen (the way it's supposed to work). NOTE: This is not an official package; I want to get it out there for testing. If it tests out well, I'll work with the shell maintainers to have the 'stty' hack removed (if applicable) - which would then cause this bug to [finally] be closed. New (Fedora) package - screen-4.0.1-2.i386.rpm will appear in rawhide soon. This package does *not* have a bindkey default, as per the screen maintainer's recommendation. For now, you can retrieve the proper RPMs using yum from my repository: http://people.redhat.com/lhh/fedora/ Or directly: http://people.redhat.com/lhh/fedora/screen-4.0.1-2.i386.rpm http://people.redhat.com/lhh/fedora/screen-4.0.1-2.src.rpm ** Note: You will need to comment out the block which executes "stty `tput kbs`" in /etc/bashrc if you are using setup <= 2.5.27-1.1 Changing component to "setup" (which owns /etc/bashrc) Added in 2.5.28-1, will be in rawhide tomorrow. Erm, 2.5.30. |