Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1369182
Summary: | Arrow keys dont work inside tmux for putty in Fedora 24 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Konstantin Zemlyak <zart> | ||||||||||
Component: | tmux | Assignee: | Sven Lankes <sven> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 26 | CC: | dcantrell, diftraku, jacob.e.keller, m.hatifnatt, mlichvar, praiskup, rosset.filipe, strobert, sven | ||||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||||
Target Release: | --- | ||||||||||||
Hardware: | x86_64 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | tmux-2.2-4.fc25 tmux-2.5-1.fc26 | Doc Type: | If docs needed, set a value | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2017-07-27 16:52:34 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Konstantin Zemlyak
2016-08-22 15:28:20 UTC
Here is upstream discussion that led to this change in the putty terminfo: https://lists.gnu.org/archive/html/bug-ncurses/2016-01/msg00010.html Does the problem happen when not in tmux? Interesting. Testing with TERM=putty shows following: 1) 'cat -vT' shows that terminal sends \E[A .. \E[D by default, \E0A .. \E0D when holding shift and/or ctrl. 2) Outside of tmux arrows work fine in vim, nano, mc, bash, zsh, psql. 3) Inside tmux they still work fine in vim, nano, mc, but left/right does not work in bash, zsh and psql. 4) Holding shift and/or control inside tmux makes left/right arrows work. Using TERM=putty-noapp fixes readline programs inside tmux. I don't understand why up/down works but left/right doesn't. And can't decide what to blame - updated terminfo in ncurses, GNU readline not using application mode properly or tmux which exhibits weird behavior. Also zsh deserves seperate bug for broken home/end keys. Upon reading http://git.suckless.org/st/plain/FAQ I've created ~/.inputrc with 'set enable-keypad on' line, and ~/.zshrc with: function zle-line-init () { echoti smkx } function zle-line-finish () { echoti rmkx } zle -N zle-line-init zle -N zle-line-finish This have fixed the original issue, though home/end are still broken in zsh. I personally ended up getting an older version of the terminfo files from Ubuntu 14.04 (ncurses-term 5.9+20140118) and plopped them in-place over the newer ones (Fedora 24, ncurses-term 6.0-6.20160709) and everything works as usual. I personally feel workarounds are not acceptable solutions and the older version of the PuTTY terminfos shoud be used instead of the newer upstream one for the time being. I have this exact problem on Fedora 25 still, the only workarounds are an old terminfo file, or using keypad on, in inputrc. The keypad solution is non-workable as it means that every single server I SSH into must have this setup. This is an issue in tmux, and was fixed in tmux 2.4 Created attachment 1286471 [details]
fix for the application keys in tmux
The attached patch is a cherry-pick onto the 2.2 tag of tmux, which we should be able to backport and include to fix this issue in the tmux-2.2 source for Fedora 25.
Created attachment 1286472 [details]
updated SRPM package for Fedora 25
I took the liberty of downloading the fedora 25 SRPM for tmux (tmux-2.2-3.fc25.src.rpm) and adding in the patch file that fixes the issue. Hopefully this helps the package owner out.
Thanks, fixed in F25, please test the package and give some karma. https://src.fedoraproject.org/cgit/rpms/tmux.git/commit/?h=f25&id=0bf7d3667f82ba32d3f9fcc8b058236e96fb3cd9 https://koji.fedoraproject.org/koji/taskinfo?taskID=19942757 tmux-2.2-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-094433a33e tmux-2.2-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-094433a33e tmux-2.2-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. This wasn't fixed upstream until tmux 2.5 so the same fix needs to be backported into the 2.3 package in Fedora 26. I'm planning to update tmux on F26 to latest 2.5 release (already on rawhide). Since F26 will be supported for at least 13 months I think it's the better approach. Created attachment 1297814 [details]
Fedora 26 SRPM
This uses the exact same patch for the Fedora 25 2.2 build.
That's fine. I rebuilt a 2.3-3 version you can provide now or wait for the 2.5 update. I can easily use this 2.3-3 version locally until an update is provided. Created attachment 1297815 [details]
fixed Fedora 26 SRPM
The first attachment forgot to actually apply the patch.
tmux-2.5-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e9083815d8 tmux 2.5 available on Fedora 26, testing needed. tmux-2.5-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e9083815d8 This works for me in Fedora 26 tmux-2.5-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |