Bug 179142 - can't set tabtitle and window title independently
Summary: can't set tabtitle and window title independently
Alias: None
Product: konsole
Classification: Unclassified
Component: general (show other bugs)
Version: 2.2
Platform: unspecified Linux
: NOR wishlist with 120 votes (vote)
Target Milestone: ---
Assignee: Konsole Developer
: 188245 (view as bug list)
Depends on:
Reported: 2008-12-30 14:54 UTC by Mathieu Jobin
Modified: 2012-02-24 13:37 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Jobin 2008-12-30 14:54:05 UTC
Version:           2.2 (using 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2)), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-9-generic

I classify it as a bug, since it is a regression from the 3.5.x series. This is a feature many of my co-workers enjoyed and are missing with 4.x

in scripts, we do 

echo -en "\e]0;Set Window Title\a"


echo -en "\e]33;Set Tab Name\a"

so we can identify our tab/window.

in KDE4, the two has been merged. the title is always equal to the select tab. which is a little bit sad but not as inconvenient as the fact that the standard echo/escape commands abode does not work anymore.

any kind of replacement ?

Comment 1 Robert Knight 2008-12-30 18:31:41 UTC
For most people the window title from the shell is not very useful, for tab titles especially, so Konsole provides its own.

You can change the tab/window title to respect the window title set by the shell by going to Settings -> Edit Current Profile -> Tabs and clicking Insert -> 'Window Title Set by Shell'

There is a separate feature request already for the ability to set different tab/window titles.
Comment 2 Mathieu Jobin 2009-10-07 20:20:39 UTC
i don't want to do it with my mouse.
i want it to be done automatically with script.

actually, Redhat system does that automatically in /etc/bashrc for TERM=xterm and TERM=screen

so when I SSH onto a server, Konsole's TAB and Window title gets changed automatically. in KDE3, it was working very well. and the window title and the tab text could be changed independently.

now in KDE4, they can no longer be change with the standard echo command.
and they cannot be independently different.

please fix.

thank you
Comment 3 Vesko 2009-12-07 09:22:26 UTC
I have a similar problem: When I rename a tab (using Ctrl-Alt-s) after a while the tab is renamed back to the profile name - I want it to stay with the name I gave it. "tab title format" is blank in "edit profile" of course. Also, KDE3 had the awesome feature to colour each tab text with different colour, what happened with it?
Comment 4 mark 2010-02-19 15:30:01 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 mark 2010-02-19 15:38:59 UTC
Here's how I experienced this as a bug: I use tools to "switch to a window by name"... both Deskbar and Kupfer do this. The idea is I that I can just think (and type) "konsole", and it will launch if it is not running, or switch to it if it is. This works fine with Konsole 3.5.x, but breaks with Konsole 4.x.

As a workaround, I tried using the profile preferences to adjust the tab names to include "- Konsole" in them, but then my tab names look long and horrible. 

So, I consider the old behavior superior and more usable-- it allows me to have "konsole" in the title for easy application identification and switching, while keeping the tab names minimal to conserve space. 

Comment 6 Vsevolod Krishchenko 2010-02-19 16:06:26 UTC
*** Bug 188245 has been marked as a duplicate of this bug. ***
Comment 7 Samuel B. Quiring 2010-04-26 19:52:40 UTC
xterm advertises (http://www.kernel.org/doc/man-pages/online/pages/man4/console_codes.4.html) the following:

ESC ] 0; text ST  -- set icon name and window title to txt
ESC ] 1; text ST  -- set icon name to text
ESC ] 2; text ST  -- set window title to text

The icon is the button on the task bar.  I set the xterm title bar to have my full path name.  I set the icon, where space is at a premium, to just the current directory name.  I can't get this to work in konsole.  ESC ] 1 does not work and EXC ] 2 works identically to ESC ] 0.
Comment 8 Kamil Dziedzic 2011-06-05 21:27:50 UTC
3 years after kde4 release and still I miss this feature - when will you fix that?
Comment 9 Gris Ge 2011-08-19 07:15:10 UTC
#Check these code.

CURR_SE_ID=$(qdbus org.kde.konsole /Konsole \
PRE_TAB_FORMAT="$(qdbus org.kde.konsole /Sessions/${CURR_SE_ID} \
    org.kde.konsole.Session.tabTitleFormat 0)"
qdbus org.kde.konsole /Sessions/${CURR_SE_ID} \
    org.kde.konsole.Session.setTabTitleFormat 0 ""
qdbus org.kde.konsole /Sessions/${CURR_SE_ID} \
    org.kde.konsole.Session.setTitle 0 "Your_String"
qdbus org.kde.konsole /Sessions/${CURR_SE_ID} \
    org.kde.konsole.Session.setTitle 1 "Your_String"

#Format 0 is the initial format, if you only change 1, it will change back to 0
#after some seconds.

#Do something.
sleep 10
#change back
qdbus org.kde.konsole /Sessions/${CURR_SE_ID} \
    org.kde.konsole.Session.setTabTitleFormat 0 "${PRE_TAB_FORMAT}"

I think we can close this bug as "Not a Bug"
Comment 10 mark 2011-08-19 15:00:09 UTC
As a previous commenter, I will say that that I figured out a way to switch to Konsole with a keyboard shortcut, which was my complaint. I use xbindkeys, along with this command in .xbindkeysrc:

#Launch or switch to Konsole
"wmctrl -xa Konsole || konsole"
    Alt + 3
Comment 11 Jekyll Wu 2012-02-10 05:52:47 UTC
Comment 12 Luke-Jr 2012-02-10 17:19:35 UTC
How is a regression a "wishlist"? :/
Comment 13 Robert Knight 2012-02-10 17:37:56 UTC
Hi Luke,

How best to label this is debatable but it isn't likely to affect what matters - implementing the feature or rejecting it.  If you can help out by reviewing Jekyll's patch, please do so.
Comment 14 Jekyll Wu 2012-02-10 18:02:55 UTC
Hi Luke:

I changed its severity to 'wish' in the sense that KDE3 konsole => KDE4 konsole is more like rewriting than normal upgrading. 

Anyway, the severity is not that important. I have created a simple patch(or hack?), although I'm not a fan of this feature. As Robert has said, the important thing is try that patch and give feedback if you( I mean all those who have voted ) miss this feature.

OK, here is one good reason for changing it to 'wish': I now have a good excuse for not backporting the patch into the KDE SC 4.8 series if it is ever committed. I do not use this feature so it is better to stay in the development branch for more testing if it is ever re-introduced.
Comment 15 Jekyll Wu 2012-02-24 13:37:36 UTC
Git commit 363a2701774ffd0b14bfd8223a5848179a427bd6 by Jekyll Wu.
Committed on 24/02/2012 at 13:14.
Pushed by jekyllwu into branch 'master'.

Allow changing tab title through escape sequence

Users can now change the tab title through "\e]30;Tab Title\a" .

This is a feature previously available in KDE3 konsole.
FIXED-IN: 4.9.0

REVIEW: 103862

M  +4    -3    src/Session.cpp