bugGNU Screen - Bugs: bug #50601, Screen rewrites 38;5;nn escapes...

 
 

bug #50601: Screen rewrites 38;5;nn escapes even when surrounding terminal supports them

Submitter:  Peder Stray <pstray>
Submitted:  Tue 21 Mar 2017 01:30:39 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.5.0
Fixed Release:  None Planned Release:  5.0.0
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 09 Jul 2017 09:57:47 PM UTC, comment #5: 
Amadeusz Sławiński <amade>
Group administrator
Wed 22 Mar 2017 05:05:54 PM UTC, comment #4: 

Just to see what screen does, I straced it.  Seems it maps both back and foreground of 38;5;nn and 48;5;nn into 30/40 and 90/100 for 0 to 15.  Attached a new file that shows what the test program outputs, what screen reads in, and what screen writes out.

(file #40065)

Peder Stray <pstray>
Wed 22 Mar 2017 01:50:08 PM UTC, comment #3: 

Thanks, confirmed.

Amadeusz Sławiński <amade>
Group administrator
Wed 22 Mar 2017 01:14:54 PM UTC, comment #2: 

TERM is xterm-256color in both gnome-terminal (3.18.3) and xterm (322). In screen (4.03.01) on my local host TERM=screen.xterm-256color, in screen (4.05.01) on my remote TERM=screen-bce.

infocmp output for all of them will are attached.

I've also attached a test script that should display the error when present, the line prefixed with "1;38+0" should be the same as the one above it, not alternating in intensity.



(file #40057, file #40058, file #40059, file #40060)

Peder Stray <pstray>
Wed 22 Mar 2017 08:53:51 AM UTC, comment #1: 

I can't reproduce, please provide more details:
gnome-terminal version
screen version
output of
"echo $TERM" and "echo $COLORTERM"
inside and outside of screen
script used to test color codes.


Amadeusz Sławiński <amade>
Group administrator
Tue 21 Mar 2017 01:30:39 PM UTC, original submission:  

Even though the surrounding terminal supports 256-colors and thus 38;5;nn escapes, screen seem to rewrite those sequences for at least colors 0 through 7 to 30+nn instead.  This causes color errors when combing whith bold (1) as 30+nn together with bold usually maps to colors nn+8, and thus any of the first 8 colors is then displayed as bright intensity in addition to bold.

See the two supplied images, the first showing how gnome-terminal displays the colors (and how they should be), the second how the same output in screen causes translation of escape codes an thus the display of wrong colors.

The same happens with xterm as the surrounding terminal.

Peder Stray <pstray>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #40065:  screen-output.txt added by pstray (5KiB - text/plain)
file #40059:  infocmp-screen-bce.txt added by pstray (2KiB - text/plain)
file #40060:  term-test.pl added by pstray (963B - application/x-perl)
file #40045:  terminal-noerror.png added by pstray (27KiB - image/png)
file #40046:  screen-error.png added by pstray (27KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by pstray (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-09 amade StatusConfirmed Fixed
        Planned ReleaseNone 5.0.0
    2017-03-22 pstray Attached File- Added screen-output.txt, #40065
    2017-03-22 amade StatusNeed Info Confirmed
    2017-03-22 pstray Attached File- Added infocmp-xterm-256color.txt, #40057
        Attached File- Added infocmp-screen.xterm-256color.txt, #40058
        Attached File- Added infocmp-screen-bce.txt, #40059
        Attached File- Added term-test.pl, #40060
    2017-03-22 amade StatusNone Need Info
    2017-03-21 pstray Attached File- Added terminal-noerror.png, #40045
        Attached File- Added screen-error.png, #40046

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code