[Bug 1548032] [NEW] Set Konsole's TERM variable to xterm-256color by default

Nightfall 1548032 at bugs.launchpad.net
Sun Feb 21 09:39:26 UTC 2016


Public bug reported:

It would be great to have applications like vim use nice color schemes
(i.e. 256 colors) by default in Konsole. To make this happen, Konsole
needs to indicate its 256 color support via the TERM variable.

One way to do this might be to patch /usr/share/konsole/Shell.profile (tested on a recent Kubuntu Xenial daily - no custom Konsole profile existing):
--- current/Shell.profile	2016-02-21 09:00:57.568940764 +0000
+++ 256colors/Shell.profile	2016-02-21 09:01:23.821266723 +0000
@@ -1,4 +1,5 @@
 [General]
+Environment=TERM=xterm-256color
 Name=Shell
 Name[af]=Tolk
 Name[ar]=الصدفة

Users' existing Konsole profiles would have to be adjusted manually.


For comparison, "echo $TERM" in several distributions' (current live systems) main terminal emulators prints: 

xterm-256color in:
Ubuntu Xenial (recent daily) - GNOME Terminal
Fedora 23 (Workstation Edition) - GNOME Terminal
Fedora 23 (KDE) - Konsole (but xterm in Konsole profile, see Fedora Wiki URL below)

xterm in:
Xubuntu Xenial (recent daily) - xfce4-terminal
Tanglu 3 KDE - Konsole
Tanglu 3 GNOME - GNOME Terminal


This KDE bug report from 2011 AFAICT indicates it's up to the user/distribution to make sure 256 colors are supported (see below) and then set TERM (in Konsole) accordingly: https://bugs.kde.org/show_bug.cgi?id=212145

256 color support via TERM=xterm-256color AFAICT needs /lib/terminfo/x
/xterm-256color, which in (K)ubuntu (Xenial) is contained in ncurses-
base and, according to this package's changelog, had been moved there in
2008. I don't know if anything else is needed - I've been using this
TERM value for several years now in Kubuntu/Konsole and it worked/I
didn't notice any specific breakage.

For more discussion on different methods to set TERM (2012/2013):
https://fedoraproject.org/wiki/Features/256_Color_Terminals

As a side note, using xterm-256color also had the nice side effect of
enabling a colored Bash prompt in Konsole/Kparts by default (see default
.bashrc).

** Affects: konsole (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to konsole in Ubuntu.
https://bugs.launchpad.net/bugs/1548032

Title:
  Set Konsole's TERM variable to xterm-256color by default

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/konsole/+bug/1548032/+subscriptions




More information about the kubuntu-bugs mailing list