Ticket #3626 (closed defect: duplicate)

Opened 9 years ago

Last modified 9 years ago

Themes behaves differently with TERM=xterm-256color

Reported by: eugenesan Owned by:
Priority: minor Milestone:
Component: mc-skin Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Themes behaves differently with TERM=xterm-256color.
For example folders and execuables are not displayed using bold.

Starting with "TERM=xterm mc" solves the problem.

Attachments

mc-modarin.png (190.2 KB) - added by zaytsev-work 9 years ago.
lubuntu-default.png (431.8 KB) - added by mooffie 9 years ago.

Change History

comment:1 Changed 9 years ago by andrew_b

  • Component changed from mc-core to mc-skin
  • Milestone changed from 4.8.17 to Future Releases

comment:2 follow-up: ↓ 7 Changed 9 years ago by mooffie

I too don't like this behavior (it's by design, not a bug), which is why I'm not using xterm-256color.

In modern distros (at least Ubuntu) TERM is "xterm-256color" by default. Add to this the fact that prevalent terminal palettes don't have enough contrast between "white" and "lightgrey" (or is it "grey") and you get a usability problem "out of the box".

comment:3 Changed 9 years ago by zaytsev

Is it not a rendering bug in the terminal emulator? I use vte and my TERM is xterm-256color, and with Droid fonts, which have a real (not faux) bold versions the directories are correctly rendered bold.

comment:4 Changed 9 years ago by eugenesan

According to original 256c support commit, referenced by @mooffie, lack of bold is an intended behavior. Unfortunately original commiter mistakenly assumed that everybody treat colors the same and that was a strategic mistake.
Just so you know, some people (up to 10%) and especially IT/SW people, have troubles with colors or don't see them at all (sad statistics). Now add to that hours of monitoring tiny and promptly changing characters and we have usability problem "out of the box"! [(c)Mooffie]

@zaytsev, regarding the Droid font.
I couldn't test it on Ubuntu 16.04 since it was removed but when tested on Ubuntu 14.04 in Gnome-Terminal, the problem is the same.

As a quick and simple solution, I suggest disabling 256c mode unless current theme does declare support for it. Fortunately we have "[skin]::256colors = true" for that.

What do you think?

Changed 9 years ago by zaytsev-work

comment:5 follow-up: ↓ 6 Changed 9 years ago by zaytsev-work

@eugenesan, I've just attached a screenshot of mc under Ubuntu 14.04 with the default (Ubuntu) fonts, TERM=xterm-256color and modarin256-defbg skin in gnome-terminal (vte). Can you explain me what's wrong here? The directories are as bold as it gets.

comment:6 in reply to: ↑ 5 Changed 9 years ago by mooffie

Replying to zaytsev-work:

@eugenesan, I've just attached a screenshot of mc under Ubuntu 14.04 with the default (Ubuntu) fonts, TERM=xterm-256color and modarin256-defbg skin in gnome-terminal (vte). Can you explain me what's wrong here? The directories are as bold as it gets.


That's because 'skins/modarin256-defbg.ini' has:

[filehighlight]
    directory = color144;;bold

Note the ";bold".

Most other skins, including the default one (skins/default.ini), don't specify ";bold" explicitly and therefore aren't displaying bold in 256 mode.

What @eugenesan suggests is to have, as in the old days, the 8 high-intensity colors ("white", "brightgreen", "brightred", "yellow", ...) be bold by default when not using a 256 colors skin, at least. (I say "at least" because people may want to have them bold even when a 256 skin is active: because of the editor syntax files, or because they simply prefer bold.)

(For the record: one solution that doesn't involve coding is to to add ";bold" explicitly to all "directory=" lines. But we use high-intensity colors in other places too ("executable=", syntax files).)

Version 0, edited 9 years ago by mooffie (next)

comment:7 in reply to: ↑ 2 Changed 9 years ago by mooffie

I'm attaching a screenshot that shows what a new user sees on Lubuntu (a sort of Ubuntu). That's gnome-terminal. Note how (when in 256 colors, default skin) it's not easy to distinguish between directories and normal files.

Replying to mooffie:

In modern distros (at least Ubuntu) TERM is "xterm-256color" by default.

(I now see that setting TERM to "xterm-256color" is, probably, the work of gnome-terminal itself.)

Changed 9 years ago by mooffie

comment:8 Changed 9 years ago by egmont

Dup of #3048.

comment:9 Changed 9 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #3048.

Note: See TracTickets for help on using tickets.