Bug 271272 - Tab name doesn't revert after closing mc
Summary: Tab name doesn't revert after closing mc
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
Depends on:
Reported: 2011-04-19 08:36 UTC by aditsu
Modified: 2011-08-26 04:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description aditsu 2011-04-19 08:36:24 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

If I run mc in console and then close it, it still shows "mc" in the tab name. I can even run anything else afterwards, it still shows "mc". Please refer to this clip: http://www.youtube.com/watch?v=qlGcfQp5NHM
The tab title format is: %d : %n  %w

Reproducible: Always
Comment 1 Jekyll Wu 2011-07-30 19:41:51 UTC

*** This bug has been marked as a duplicate of bug 271275 ***
Comment 2 aditsu 2011-07-30 19:51:34 UTC
I don't think this is a duplicate, but a different bug. In bug 271275, the tab name reverts after pressing enter. In this bug it doesn't.
Comment 3 Jekyll Wu 2011-07-30 20:25:44 UTC
(In reply to comment #2)
> I don't think this is a duplicate, but a different bug. In bug 271275, the tab name reverts after pressing enter. In this bug it doesn't.

From my experience, in this report the tab title will also be reverted after pressing ENTER. Or, just wait for one or two seconds after quitting mc then the tab title will be reverted, not showing 'mc' anymore for '%n'.

I tested it in zsh and bash.
Comment 4 aditsu 2011-07-30 20:27:15 UTC
Have you seen the youtube video I linked?
Comment 5 Jekyll Wu 2011-08-25 03:32:29 UTC
OK, I watched that video. But I think you misunderstood something. 

Your tab title is composed of 3 parts: %d for directory, %n for process name, and %w for window title set by escape code. In both my experiment and your video clip, the %n part reverts from 'mc' to 'zsh' after mc exits. Yes, the %w part still shows "mc [...]" even after another command top is executed. But that behavior is correct: if no escape code is ever sent to clear or change that window title, it will just stay the same . It is not konsole that is responsible for changing the window title . Konsole just shows the window title for %w as it is.

Try ` echo -en "\e]0;window title\a" ` in the shell, and you will understand what I mean.
Comment 6 aditsu 2011-08-25 04:15:18 UTC
Oh, I see... so the window title is a persistent attribute of the shell, that has no connection with konsole or the life cycle of programs. Then the problem is that mc is setting the title and not reverting when I close it. I'll see if I can find something about that.
Comment 7 Jekyll Wu 2011-08-25 18:44:29 UTC
Technically, that window title is a persistent attribute of the terminal (no, not shell)which is emulated by konsole. 

I think the thing is explained and accepted. I will close it.
Comment 8 aditsu 2011-08-26 04:16:44 UTC
Alright, thank you.