bugGNU Screen - Bugs: bug #67566, xterm-256color doesn't work on...

 
 

bug #67566: xterm-256color doesn't work on Solaris

Submitter:  Petr Sumbera <psumbera>
Submitted:  Thu 02 Oct 2025 09:29:39 AM UTC
   
 
Category:  User Interface Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  5.0.1
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Fri 03 Oct 2025 07:34:25 AM UTC, comment #2: 

I have tried to set "screen.xterm-color256" but it doesn't help.

But on Linux it works. So it's Solaris specific problem...

Petr Sumbera <psumbera>
Thu 02 Oct 2025 10:37:11 AM UTC, comment #1: 

propos initial :

> export TERM=xterm-256color


Shouldn't you use a TERM value that starts with "screen" in a Screen window? Probably something like "screen-256color" possibly with some suffix.

Vincent Lefèvre <vinc17>
Thu 02 Oct 2025 09:29:39 AM UTC, original submission:  

This was tested on Solaris 11.4:

cat > test.sh << EOF
for i in {0..255}; do
    printf "\x1b[48;5;\${i}m%4d" \$i
    if (( (\$i + 1) % 16 == 0 )); then
        printf "\x1b[0m\n"
    fi
done
printf "\x1b[0m\n"
EOF
export TERM=xterm-256color
bash test.sh

---

No colors were displayed.

---

While trying to bisect the problem I found it's regression
from:

https://cgit.git. ... 1185a274466f69b80

---

Following seems to resolve the issue:

--- screen-5.0.1/display.c
+++ screen-5.0.1/display.c
@@ -1341,8 +1341,7 @@ if (f > 15 && D_CCO != 256) {
                        f = D_CCO == 88 && D_CAF ? color256to88(f) : color256to16(f);
                }
                if (D_CAF) {
-                       AddCStr2(D_CAF, f); FIXME
-                       tputs(tparm("\033[38;5;%dm", f), 1, DoAddChar);
+                       AddCStr2(D_CAF, f);
                }
               
        }
@@ -1379,8 +1378,7 @@ if (b > 15 && D_CCO != 256) {
                        b = D_CCO == 88 && D_CAB ? color256to88(b) : color256to16(b);
                }
                if (D_CAB) {
-               //      AddCStr2(D_CAB, b); // FIXME
-                       tputs(tparm("\033[48;5;%dm", b), 1, DoAddChar);
+                       AddCStr2(D_CAB, b);
                }
        }
        if (b != ob && (b & 0x04000000) && hastruecolor) {

Petr Sumbera <psumbera>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by anaumov (Updated the item)
  • -email is unavailable- added by vinc17 (Posted a comment)
  • -email is unavailable- added by vinc17 (Subscribed to discussion)
  • -email is unavailable- added by psumbera (Submitted the item)
  •  

    Votes

    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.

     

    History

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-10-03 anaumov StatusNone Wont Fix
        Summaryxterm-256color doesn't work xterm-256color doesn't work on Solaris
    2025-10-02 vinc17 Carbon-Copy- Added vinc17

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code