Ticket #4137 (new defect)

Opened 3 years ago

Last modified 3 years ago

TERM "*-direct" values are not recognized as True Color-capable

Reported by: RogueScholar Owned by:
Priority: major Milestone: Future Releases
Component: mc-tty Version: master
Keywords: truecolor, terminfo, color Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Using latest versions of Konsole and Yakuake terminal emulators with True Color (24-bit or Direct RGB) color support announced via the pair of environment variables:

 TERM=konsole-direct
 COLORTERM=truecolor

With MC configured to use either 256-color or 16M-color skins reports on invocation that the terminal is capable of only basic 16-color palettes and has reverted to the default skin accordingly. Prepending 'TERM=konsole-256color' to the invocation while leaving the COLORTERM variable set as before provides the expected behavior, with skins of all color bit-depths able to be set and subsequently displaying as designed. A test with TERM set to the more generic 'xterm-direct' value produced the same results as 'konsole-direct' where MC does not recognize direct RGB colors. This leads me to conclude that MC lacks recognition for the "-direct" values for TERM which were implemented in S-Lang 2.3.1 built with ncurses >=6.1.

System info

  • Operating System: Kubuntu 20.10
  • KDE Plasma Version: 5.20.0
  • KDE Frameworks Version: 5.76.0
  • Qt Version: 5.15.0
  • Kernel Version: 5.8.0-23-generic
  • OS Type: 64-bit

Hardware

  • Model: Lenovo ThinkPad? T420s
  • Processor: Intel® Core™ i7-2620M CPU @ 2.70GHz
  • Memory: 8 GiB of RAM
  • Graphics Processor: NVS 4200M/PCIe/SSE2

Relevant Software Versions

  • libncursesw6: 6.2
  • libslang2: 2.3.2 (built using unicode-data 13.0.0)
  • konsole: 20.08.2
  • yakuake: 20.08.1

Debugging command output

$ LC_MESSAGES=C mc -V

  GNU Midnight Commander 4.8.25-55-g5bf714b
  Built with GLib 2.64.2
  Built with S-Lang 2.3.2 with terminfo database
  With builtin Editor and Aspell support
  With subshell support as default
  With support for background operations
  With mouse support on xterm and Linux console
  With support for X11 events
  With internationalization support
  With multiple codepages support
  With ext2fs attributes support
  Virtual File Systems:
   cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish
  Data types:
   char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

$ mc --configure-options

   '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include'
   '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info'
   '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib'
   '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking'
   '--disable-silent-rules' '--with-x' '--with-screen=slang' '--enable-aspell'
   '--disable-rpath' '--disable-static' 'build_alias=x86_64-linux-gnu'
   'CFLAGS=-g -O2 -fdebug-prefix-map=/build/mc-4.8.25~git20201017=.
   -fstack-protector-strong -Wformat -Werror=format-security'
   'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
   'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

Change History

comment:1 Changed 3 years ago by andrew_b

  • Component changed from mc-core to mc-tty

comment:2 follow-up: ↓ 3 Changed 3 years ago by andrew_b

Is ncurses-term package installed?

comment:3 in reply to: ↑ 2 Changed 3 years ago by RogueScholar

Replying to andrew_b:

Is ncurses-term package installed?

Indeed it is, sorry for having neglected to include it in my report. It and ncurses-base are both installed, matching set with libncursesw6, all version 6.2.

Note: See TracTickets for help on using tickets.