Bug 1245426 - tmux and TERM=screen breaks reverse character escapes, please apply existing patch
Summary: tmux and TERM=screen breaks reverse character escapes, please apply existing ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: tmux
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sven Lankes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1247495 1252744 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-22 04:34 UTC by Paul DeStefano
Modified: 2016-07-19 17:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 17:07:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Paul DeStefano 2015-07-22 04:34:13 UTC
Description of problem:
After upgrading to F22, all terminals (GNOME Terminal and the real xTerm) are very broken using the recommended/standard TERM setting, screen-256color

Version-Release number of selected component (if applicable):
tmux-1.9a-5.fc22.x86_64

How reproducible:
Since F22, I can't figure out how to fix it.

Steps to Reproduce:
1. start tmux
2. start alpine or finch or wyrd or anything that can use the color terminal
3. OR, just run 'man tmux'

Actual results:
The tell-tale symptom is that bold text is now bold, but italicized, instead.  Other artefacts have also been noticed, i.e. terminal line-drawings are sometimes badly messed up.

Expected results:
Everything was fine in F21, so I don't see why this should be any different.

Additional info:
The problem occurs with TERM=screen, the default, and TERM=screen-256color, which I thought was the recommended setting.  At least that's what I learned from the guys on #tmux.

Comment 1 Paul DeStefano 2015-07-24 06:39:19 UTC
Correction: tell-tale sign is that *reverse* characters are show as italicized.

Sorry.

I'm very confused.  Please help.

Comment 2 Paul DeStefano 2015-07-28 08:11:11 UTC
Read up on this; it's a long story but, apparently, well known.  I don't know why ncurses pkg was updated with this change, but tmux was not.

Seems like the terminfo has always been wrong and the current version is "correct," despite the fact that screen, itself, does *not* respect the new capability.  Makes no sense, whatsoever.

In any case, tmux had to be patched for this specific issue!  Please update tmux with this patch.

Comment 3 Sven Lankes 2015-07-28 09:10:22 UTC
Hi paul.

Which "existing patch" are you referring to?

Comment 4 Paul DeStefano 2015-07-29 03:35:08 UTC
I only know it as the fix for 'screen' terminfo change.  TMUX refers to it as "standout instead of italics for SGR3".  Oh, here's a git ref # and msg:

f60d88cd24: use standout instead of italics for SGR3, like screen does

Does that help?  I figured someone on the tmux dev side would recognize it; it got quite a bit of coverage from Debian & Ubuntu folks.  See post 82, here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756353#82

They cherry-picked it onto the 2.0 branch, but I'm hoping you can pick it on 1.9 or maybe rev tmux?  Whatever you can do would be great.

BTW, two workarounds are mentioned:
1) use the 'terminal_override' setting to give the traditional behavior (see bug for details).
2) create your own terminfo.  (See tmux docs under "vim" and "italics" for a script.)  I can confirm this works, but what a crazy workaround.

Comment 5 Paul DeStefano 2015-08-02 00:16:31 UTC
BTW, workaround #2 has a major drawback, I found: it doesn't scale; every system I ssh into breaks because it doesn't have my special terminfo file.  I knew that was a terrible idea.  I haven't tried it, but now I can confidently recommend  #1, instead.

Comment 6 Paul DeStefano 2015-08-02 01:50:40 UTC
Ugh, what a headache.  I couldn't get workaround #1 to work either.  I see that the example in the referenced bug applies to 'xterm*' terminals, but that makes no sense whatsoever since the problem doesn't occur with TERM=xterm.  'xterm' is fine, 'screen' is what is changed.

If someone could explain the proper override string, that would be great.  I can't figure out how to use terminal-override to fix this.

Comment 7 Jon Jensen 2015-08-11 20:01:42 UTC
I'm having the same problem. Using `TERM=xterm alpine` solves that one particular problem tolerably, but tmux is broken with the default TERM=screen for man, less, and everything else to a greater or lesser degree.

Comment 8 Paul DeStefano 2015-08-12 20:28:23 UTC
*** Bug 1252744 has been marked as a duplicate of this bug. ***

Comment 9 Paul DeStefano 2016-06-23 09:13:14 UTC
I think this is fixed in F24.  Do others agree?

If someone knows how this got fixed, I'm very curious.  Patch was there a year ago but didn't make it into new version 2.1-2 packaged in F23.

Comment 10 Jon Jensen 2016-07-14 18:11:39 UTC
Yes, it's working for me in F24. TERM=screen with alpine, man, and less all work fine now. Thanks.

Comment 11 Miroslav Lichvar 2016-07-19 10:02:29 UTC
*** Bug 1247495 has been marked as a duplicate of this bug. ***

Comment 12 Fedora End Of Life 2016-07-19 17:07:17 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.