(Partially Solved) Changing Caption of Konsole-Tabs

Florian G. Pflug fgp at phlo.org
Mon Feb 16 13:02:22 GMT 2004


On Mon, Feb 16, 2004 at 09:04:59AM +0100, Pascal Brück wrote:
> Am Montag, 16. Februar 2004 03:43 schrieb Florian G. Pflug:
> > Is it possible to change the caption of the Konsole-Tabs via some
> > escape-code? I know it's possible for the window title, but even
> > heavy googling didn't show me a way so set the tab captions
> 
> There was a nice articel in Linux Magazin:
> 
> http://www.linux-magazine.com/issue/34/KDETricks.pdf

Thanks for the link - it got me the escape-code for setting the _tab_ title
in konsole. The following does what I wanted (in konsole)
	PROMPT_COMMAND='echo -ne "\033]30;$(echo $USER)@$(hostname -f):$(pwd)\007"'

But this now make the prompt quite - well - strange for someone using
gnome-terminal, because gnome-terminal doesn't know how to handle this
escape sequence, and tries to display it as part of the prompt.

While gnome-terminal does support tabs, as konsole does, it doesn't allow
the tab-caption to be different from the window title, and sets the
tab-title when you issue the window-title escape sequence
	PROMPT_COMMAND='echo -ne "\033]0;$(echo $USER)@$(hostname -f):$(pwd)\007"'
(note the \033]0 instead of \033]30)

The following shell fragment works for konsole, xterm and the linux console
(text-mode)
if test "$TERM" = "xterm" ; then
PROMPT_COMMAND='echo -ne \
"\033]30;$(echo $USER)@$(hostname -f):$(pwd)\007"\
"\033]0;$(echo $USER)@$(hostname -f):$(pwd)\007"\
'
fi

If someone has an idea how to make that work for gnome-terminal too (or at
least prevent prompt-corruption) please let me know. 

greetings, Florian Pflug

PS: Sorry if you feel that this post is off topic - but I figured that a
kde-gnome interoperability question is probably OT, no matter if you post it
on a kde or a gnome list.
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list