Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 62530

Summary: Terminal window titles do not work when using Konsole
Product: Gentoo Linux Reporter: Michel Wilson <michel>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michel Wilson 2004-09-01 10:03:50 UTC
The window titles of terminal sessions are only updated when $TERM is xterm*, rxvt, Eterm or eterm. My Konsole-session sets $TERM to linux, and I don't get fancy window titles.

Reproducible: Always
Steps to Reproduce:
Start a terminal session with Konsole, with the 'Linux console' profile

Actual Results:  
No nice fancy window title was set 

Expected Results:  
The expected result is that the windowtitle is set to user@hostname:path 

To fix this I added the following lines to ~/.bashrc (and /etc/skel/.bashrc): 
if [ -n $KONSOLE_DCOP ]; then 
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:
${PWD/$HOME/~}\007"' 
fi 
This will detect a Konsole-session and set the window-titles.
Comment 1 Ciaran McCreesh 2004-09-01 10:15:53 UTC
Shouldn't you have

if [ -n "$KONSOLE_DCOP" ]; then

instead of

if [ -n $KONSOLE_DCOP ]; then

? Although, really, it'd be nicer if konsole handled $TERM properly like everything else...
Comment 2 Michel Wilson 2004-09-01 10:19:36 UTC
Hm, that might be better, yes. I'm not a shell-script guru or anything.
About the $TERM-handling: Konsole does handle it properly, it sets $TERM to linux, because that's what it emulates, a linux console.
Comment 3 Ciaran McCreesh 2004-09-01 10:26:11 UTC
The point being that Linux consoles do not support title setting... That's an xterm thing.
Comment 4 SpanKY gentoo-dev 2004-09-01 14:59:21 UTC
what he said