Ticket #2647 (closed defect: invalid)

Opened 11 years ago

Last modified 6 years ago

xoria256 theme broken

Reported by: god12 Owned by:
Priority: major Milestone:
Component: mc-skin Version: 4.8.0
Keywords: Cc: egmont@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


Inside GNU screen with urxvtc terminal xoria256 skin is correctly shown only if TERM=xterm-256color
In case of TERM=rxvt-256color or TERM=screen-256color xoria256 is displayed as ugly bright green theme.
Note: tput colors report 256 in all 3 cases (even in mc subshell!) so all the 256 color themes are expected to be displayed exactly the same.
Note 2: in plain urxvtc (without screen) with TERM=rxvt-256color xoria256 shown just fine.

Change History

comment:1 Changed 11 years ago by god12

Entire .screenrc - just in case:

vbell off
autodetach on
startup_message off
defscrollback 10240
shell /usr/bin/zsh
encoding UTF-8
term screen-256color
hardstatus lastline "%-Lw%{= KW}%50>%n%f* %t%{-}%+Lw%<"
hardstatus off
caption always "%{rk}%?%-w%?%{kR}%n*%t%{rk}%?%+w%? %= | %{=b kr}%c:%s %Y-%m-%d "
screen mc

comment:2 Changed 11 years ago by egmont

  • Cc egmont@… added

Works correctly for me. I'm using Ubuntu 10.04, how about you?

By the way, inside the screen, I have COLORTERM and TERMCAP defined which cause some confusion, e.g. mc believes the terminal doesn't support 256 colors, so I unset these two variables.

Could you please double check you have the exact same environment variables inside and outside screen?

comment:3 Changed 11 years ago by god12

Of course I have different env. variables: inside screen it's TERM=screen-256color, outside screen it is TERM=rxvt-256color.

Let me clear up potential confusion - that's what this bug report is about: 256 color theme displayed differently with different $TERM variables. It shouldn't.

Both TERM=rxvt-256color and TERM=screen-256color are 256-capable terminal emulators.
So in both cases xoria256 got to look the same way.

I hope it makes more sense now.

Should I add values of some env variables in here? Is there something else I can do to help debug this issue?

comment:4 Changed 11 years ago by egmont


Unfortunately I don't have a clue so far what's wrong, so I'm just guessing to random directions.

Could it be that your terminfo database is incorrect? Could you please make sure that inside screen you don't have COLORTERM or TERMCAP or other related variables that would influence the behavior?

Are you sure 256 colors are working properly within screen, with other applications? Could you please test with the 256colors.pl and 256colors2.pl scripts (you can easily find them on the internet)?

Could you please try all combinations of TERM variables and inside/outside screen, e.g. TERM=screen-256color outside screen, TERM=rxvt-256color inside screen etc.? I'm wondering if it's screen itself doing something wrong, or if it depends on the TERM settings.

Can you tell if your mc is linked against ncurses or slang? (Run ldd /path/to/mc)

I'll probably follow up with more questions. It would be much easier if I could reproduce the bug, unfortunately I cannot.

Thanks a lot for your help!

comment:5 Changed 11 years ago by egmont

Oh, I could reproduce it (or something similar) on one of the computers :)

My guess is that the output of 256colors2.pl inside screen will be incorrect for you, it will use only 16 colors.

After some research, it seems that screen doesn't autodetect if the outside terminal supports 256 colors, so it approximates all the 256 colors of its inside contents to 16 colors when it sends to the outside terminal.

Please see http://www.frexx.de/xterm-256-notes/ for the three lines you need to put in your .screenrc, as well as the configure option you should specify when compiling screen.

Could you please follow those instructions and tell us if it helped?


comment:6 Changed 11 years ago by egmont

After playing with different .screenrc files and screen compile options, I'm almost sure that your screen was configured without --enable-colors256; configuring it with this option and recompiling should help. Fingers crossed.

comment:7 Changed 11 years ago by god12

Ok, let's try one more time.

WORK == xoria256 displayed properly.
DOESN'T WORK == xoria245 displayed wrong (green colors).

Setup 1 (INSIDE screen):
.screenrc from above
mc -> WORK

Setup 2 (INSIDE screen):
.screenrc from above

Setup 3 (INSIDE screen):
.screenrc from above

Setup 4 (OUTSIDE screen):
mc -> WORK

Steps to reproduce:

  • Linux mint Katya (same as ubuntu 11.04) x86_64
  • install rxvt-unicode, ncurses-term, mc 4.8.0 (.deb from repo)
  • use .screenrc from this bug report
  • open terminal (urxvtcd) and run screen in it, then:

-- run mc (Setup 2)
-- run TERM=rxvt-256color mc (Setup 3)
-- run TERM=xterm-256color mc (Setup 1)

  • close screen and run mc (Setup 4)

mc (.deb) package from your repo is linked with libslang.so.2

Env. variables inside screen (automatically set by screen):

TERMCAP=SC|screen-256color|VT 100/ANSI X3.64 virtual terminal:\

Outside screen (in urxvtcd): $COLORTERM is the same, $TERMCAP is unset.

Tips for reproducing bug:

  • make sure that 4.8.0 release used for mc binary
  • make sure screen is using proper .screenrc (mc is started automatically in first tab)
  • make sure screen uses rxvt as a terminal ($COLORTERM has to be the same both inside and outside of screen)
  • make sure to run mc with 3 different $TERM variables (TERM=xxx mc)

Please contact me right away for any additional info you need.

Last edited 11 years ago by god12 (previous) (diff)

comment:8 Changed 11 years ago by egmont

Okay, I'm getting totally lost :( But I have a feeling that something's wrong with the environment (the variables, or screen, or terminal, or terminfo database) rather than with mc. I'm not sure though.

Could you please repeat the four steps above, with unsetting COLORTERM and TERMCAP first? I believe those variable might cause some confusion.

comment:9 Changed 11 years ago by god12

Running mc like TERMCAP="" mc inside screen with TERM=screen-256-color-s fixed it.
Feel free to close the bug cause mc can't be blamed for screen issues.
Do you know why screen is setting TERMCAP by any chance?

comment:10 Changed 11 years ago by egmont

No clue about that, sorry.

comment:11 Changed 11 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to invalid

comment:12 Changed 6 years ago by andrew_b

  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.