This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to use 256 colors in Konsole?

Tags: None
(comma "," separated)
shmerl
Registered Member
Posts
251
Karma
1
OS

How to use 256 colors in Konsole?

Tue Jul 23, 2013 4:10 pm
Does Konsole support 256 color terminal? I tried to run Midnight Commander with a 256 color theme in Konsole but it failed, claiming that the terminal doesn't support 256 colors. I didn't find any obvious settings related to this.
shmerl
Registered Member
Posts
251
Karma
1
OS
OK, just figured this out. One needs to set TERM explicitly to konsole-256color.

For example:
Code: Select all
TERM=konsole-256color mc -S modarin256-thin

TERM=xterm-256color is another option.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hm - no additional settings should be required. Prior to setting TERM manually, what is it set to on your system?
The value is "xterm" on my system - and I have "Linux Colours" selected as my Konsole colour profile.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
shmerl
Registered Member
Posts
251
Karma
1
OS
It was set simply to "xterm" before. vim and mc couldn't use 256 colors in such mode (I use custom Konsole colors profile, but it doesn't work with Linux colors as well when TERM is set to "xterm", I just tested it).

My Konsole version (current Debian testing):

Code: Select all
Qt: 4.8.5
KDE Development Platform: 4.8.4 (4.8.4)
Konsole: 2.8.4

I suspect it depends on some system defaults in defining the terminal. I see this in /lib/terminfo/x/:
Code: Select all
xterm
xterm-256color
xterm-color
xterm-debian -> xterm
xterm-mono
xterm-r5
xterm-r6
xterm-vt220
xterm-xfree86


May be openSUSE defines xterm as a symlink to xterm-256color or something.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: How to use 256 colors in Konsole?

Fri Aug 02, 2013 10:59 am
I'm afraid not - and it seems like xterm and xterm-256color are different here. I did notice a comment in /etc/profile however, which references needing to set COLORTERM to "1" to make midnight commander work.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]