Bug 37942

Summary: feature request: escape sequence to set background color (like xterm)
Product: [Applications] konsole Reporter: saurer
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 1.0.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description saurer 2002-02-10 11:15:04 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konsole
Version:           1.0.1 (using KDE 2.2.2 )
Severity:          wishlist
Installed from:    Not Specified
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

Hello!

I use the following escape sequence to control the background color of
xterm sessions when logging in to different machines:

  PS1="\[\033]11;lightgreen\007\033]0;\u@\h\007\033[0;34m\]\u@\h:\w>\[\033[0m\] "

xterm works but my konsole windows always have the same background color.

I use this simple trick to
differentiate between telnet sessions
to different hosts by looking at
the background color of the window.

Each color means a specific machine for example:
lightyellow ... machine 1
lightgreen ... machine 2
lightred ... production machine 1

NCD terminals support it xterm
too but konsole not (yet).

Kind regards
Robert Saurer

(Submitted via bugs.kde.org)
Comment 1 Stephan Binner 2002-02-10 11:42:28 UTC
What you could do at the moment is create a new session type for each of 
your hosts (for example see $KDEDIR/share/apps/konsole/linux.desktop) which
contains as "Exec" the telnet/ssh command and "Schema" specifies a schema.

KDE 2.2 has a schema editor in Control Center and 3.0 has a session editor.
Comment 2 Robert Knight 2006-08-02 20:46:48 UTC
Konsole for KDE 4 supports this escape sequence to set background colours.