Bug 309766 - Title changes to profile name instead of %w
Summary: Title changes to profile name instead of %w
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: tabbar (show other bugs)
Version: 2.10.2
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2012-11-08 19:42 UTC by kde49534
Modified: 2018-11-27 04:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde49534 2012-11-08 19:42:09 UTC
1. Set tab title format to '%w' (I also have remote tab title format to this, but don't suppose it matters).
2. Set current profile name to "Default".
3. Set shell prompt command to something like 'echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"'.
4. Press enter or something at a shell prompt, confirm window and tab title is as expected.
5. Enter vim.
6. Observe window and tab title is "[No Name] - VIM".
7. Exit vim: :q
8. Observe window and tab title is "Default".
9. Press enter to execute prompt command.
10. Observe window and tab title is as expected: "user@hostname:/foor/bar"

It is not expected that the window/tab title changes to "Default". It ought to change back to "user@hostname:/foo/bar".
Comment 1 kde49534 2012-11-08 19:43:16 UTC
I should add that https://bugs.kde.org/show_bug.cgi?id=287536 could be related, although that bug doesn't mention it changing to the profile name.
Comment 2 Jekyll Wu 2012-11-12 20:39:31 UTC
8. Observe window and tab title is "Default".

That implies the so called window title is actually set ( probably by vim, but definitely not by konsole) as a empty string at that moment, so konsole (has to) choose and show a fallback value instead. ("Default", the profile name ) . In short, "Default" is shown because the actual value is empty.

So to put it clearly, konsole itself never changes the so called window title (%w) by itself. It always updates its value per the request of some escape sequence sent by some application. If  it changes from A to B, then it is only because some application has sent a corresponding escape sequence asking for that. change  If no escape sequence is ever sent to change it, it will always stay unchanged. 

So please check whether you vim is wrongly setup. I don't see the problem by following the given step.
Comment 3 kde49534 2012-11-12 21:57:56 UTC
My vim does indeed set the window title, and even when I have it not, when it exits, the PROMPT_COMMAND is executed, but konsole does not change the title accordingly. To demonstrate this more visibly, set PROMPT_COMMAND to something like this:

'echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"; echo "\033]0;${USER}@${HOSTNAME}:${PWD}\007" >> /tmp/prompt'

You'll see the prompt string be appended to /tmp/prompt when vim exits, but, for me at least, the title string changes to "Default", and not what the prompt command tells it.
Comment 4 kde49534 2013-05-08 23:23:33 UTC
This still happens in 2.10.3. Vim exits, PROMPT_COMMAND is executed, but the window title doesn't change accordingly.
Comment 5 Andrew Crouthamel 2018-10-21 01:28:52 UTC
Hi there, I can't reproduce this, could you please test this again with the latest version?
Comment 6 Bug Janitor Service 2018-11-12 15:59:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2018-11-27 04:45:58 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!