Bug 307355 - Konsole titlebar now includes the word "Konsole"
Summary: Konsole titlebar now includes the word "Konsole"
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.9.1
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 00:56 UTC by Greta Watson
Modified: 2014-02-07 14:33 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greta Watson 2012-09-25 00:56:18 UTC
First of all, the version is 4.9.1 in Fedora 17, which was not one of the version options given above.

Bug 162326 dealt with titlebar and tab issues, and there were comments about the text of the titlebar.  I put a comment there, but was asked to open a new bug so that others who have the same concerns can put them here.

After I updated to Fedora 17 and KDE 4.9.1, the Konsole titlebar now has the word "Konsole" appended to what the user can set (e.g. %u : %D) in the titlebar.  Please get rid of the word "Konsole" in the titlebar--it is an annoyance and a distraction.  At the very least, provide me a settable option so I can eliminate that word in the titlebar.


Reproducible: Always

Steps to Reproduce:
1.  Open a Konsole
2.
3.
Actual Results:  
The word "Konsole" is appended to whatever you actually want to see on the titlebar.

E.g.:  greta : ~/txt/computer - Konsole

Expected Results:  
Not shown the word Konsole.

E.g.:  greta : ~/txt/computer

Since Konsole is now consistent with other windows, I guess this really isn't a bug as such.  However, there is no work-around, which makes this very annoying.
Comment 1 Nick Cross 2012-09-25 07:34:06 UTC
I think part of the problem is that there appears to be a defined limit on the amount of text in the title bar - 74 characters perhaps?

This leads to a situation where long commands or paths that are displayed in the title bar then get truncated at the end unless the prompt does clever things to trim the beginning. 

Will the "- Konsole" eat into this very limited space? 

I could perhaps live with the "- Konsole" if the space was the same (or even increased :-) ).
Comment 2 Christoph Feck 2012-09-25 11:20:43 UTC
The application name is visible in the title bar in all KDE applications that use KMainWindow (which means probably all of them). Could you please state why Konsole should be an exception?
Comment 3 Nick Cross 2012-09-25 11:39:37 UTC
If putting -Konsole eats into the limited title bar space ;-)
Comment 4 Greta Watson 2012-09-25 15:07:09 UTC
In Konsole, I put the user and path in the titlebar, with the basename only on the command line.  That way, the command line doesn't become too cluttered, and the path is instantly seen.  Or, it was, until "Konsole" was added.  The word "Konsole" is a big distraction; the path does not stand out like it did before.

I would actually welcome a window-by-window option to include or exclude the name of the window in the titlebar.  I don't need it in some other apps, such as Firefox and Thunderbird.
Comment 5 Greta Watson 2012-09-25 23:30:19 UTC
To let you know just how much the word "Konsole" in the titlebar irritates me, I have stopped using Konsole until I have the option to remove the word.  Instead, I'm now using xterm.
Comment 6 Christoph Feck 2012-09-26 01:11:05 UTC
I hope you enjoy using xterm, it's really a good choice.

Every change irritates. But luckily, every human has the ability to accomodate changes over time. Give it five KDE revisions, and someone will complain when the "Konsole" word gets removed. Compare it to the discussion regarding automatic icon sizing in Dolphin places panel. Once we added it, people complained. Once we removed it, people complained.

To let you know just how much developers care for users that apparently try to force them to do whatever they feel should be done, I have stopped collecting opinions for this request. Instead, I've closed it as WONTFIX.

I you feel raged now, you learned something new: You got a good impression how developers feel when reading your complaints.
Comment 7 Christoph Feck 2012-09-26 01:13:01 UTC
s/I you/If you
Comment 8 Greta Watson 2012-09-26 02:51:55 UTC
For those who are currently running Konsole 4.9.1, and who were happy with the previous version of Konsole, two changes can be made to get the previous version back, which eliminates the word Konsole from the titlebar:

sudo yum downgrade konsole konsole-part

And then, in /etc/yum.conf, add the line
exclude=konsole, konsole-part
Comment 9 Christoph Feck 2012-09-27 09:35:53 UTC
Reopened after Greta apologized in private mail. Maintainers decide what to do with this entry.

Be careful :)
Comment 10 Christoph Feck 2012-11-08 20:37:11 UTC
Bug 308995 will most certainly be resolved in KDE 4.10. With that, KWin calls a simple custom script to modify window titles, such as removing application names or stripping "http://" from URLs.

I guess this one can be resolved as a duplicate?
Comment 11 Miklos Karacsony 2014-01-27 11:31:55 UTC
How to remove the " - Konsole" part from the titlebar of Konsole (KDE)?

You have to modify a tiny little word in the source code (setCaption to setPlainCaption in src/MainWindow.cpp), here is how:

First, download the konsole source files (here: http://ftp.kde.org/stable/4.12.1/src/konsole-4.12.1.tar.xz), because you have to modify and compile it for yourself.
Unpack the tarball to a directory of your choice (eg: /source). Open up the terminal (not konsole, but xterm) and execute: cd /source/konsole-4.12.1
Then execute the following commands one-by-one:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
sed -i 's@setCaption@setPlainCaption@' ../src/MainWindow.cpp
make

And finally (as the root user, still from xterm) install the package:

make install

Enjoy!
Comment 12 Greta Watson 2014-01-27 20:34:19 UTC
Done.  Thank-you.  It seems to work.

Will this be change be in the next general release, or will I need to apply this change again when my computer updates Konsole?
Comment 13 Christoph Feck 2014-01-27 21:29:11 UTC
Greta, did you try comment #10?
Comment 14 Greta Watson 2014-01-27 22:04:04 UTC
I'm not exactly sure what I should have done with #10.  When my system updated to kde 4.10, I opened a Konsole, went to settings,  deselected "Show window title on the titlebar", and applied that.  That did not stop the window title of "Konsole" from appearing.

After I applied the changes in comment 11, I no longer get "Konsole".  If I try to edit settings and select "Show window title on the titlebar", I still don't get the word "Konsole".

So, it seems that what I did in comment 11 solves my problem, but is probably not the final solution to getting Konsole to honor the value of "Show window title on the titlebar".

Was there something else I should have done?  If so, what?  Thank-you.
Comment 15 Miklos Karacsony 2014-01-28 00:54:17 UTC
Hi Greta,

unfortunately you have to apply this "fix" on every new release yourself, as it will not included in the upcoming upstream releases.
Comment 16 Kurt Hindenburg 2014-01-28 04:11:54 UTC
Well I don't have an opinion either way really.
The docs seems to say having it as-is is the KDE way

"caption	Your caption. Do not include the application name in this string. It will be added automatically according to the KDE standard."

The "Show window title on the titlebar" refers to     
// use window title as caption only when enabled and it is not empty
it has nothing to do w/ the "Konsole".

I might look at the comments in https://bugs.kde.org/show_bug.cgi?id=308995 to see if it can be changed via script.  Otherwise, I'm open to suggestion.
Comment 17 Kurt Hindenburg 2014-01-28 04:12:10 UTC
Well I don't have an opinion either way really.
The docs seems to say having it as-is is the KDE way

"caption	Your caption. Do not include the application name in this string. It will be added automatically according to the KDE standard."

The "Show window title on the titlebar" refers to     
// use window title as caption only when enabled and it is not empty
it has nothing to do w/ the "Konsole".

I might look at the comments in https://bugs.kde.org/show_bug.cgi?id=308995 to see if it can be changed via script.  Otherwise, I'm open to suggestion.
Comment 18 Miklos Karacsony 2014-01-28 09:46:54 UTC
According to the KDE 4.0 API Reference:

void KMainWindow::setCaption	(	const QString & 	caption	 ) 	 [virtual, slot]

Makes a KDE compliant caption.

Parameters:
caption 	Your caption. Do not include the application name in this string. It will be added automatically according to the KDE standard.

VS

void KMainWindow::setPlainCaption	(	const QString & 	caption	 ) 	 [virtual, slot]

Make a plain caption without any modifications.

Parameters:
caption 	Your caption. This is the string that will be displayed in the window title.

The second one does not alter the caption you set in any way, while the first one adds the string "Konsole" as per KDE standard. It would be a good idea to implement a checkbox or something under the settings, giving the option to the users to use unaltered captions if they whish.
Comment 19 Kurt Hindenburg 2014-01-28 14:22:52 UTC
Small patch at https://git.reviewboard.kde.org/r/115354/
Comment 20 Miklos Karacsony 2014-01-28 18:58:54 UTC
Thank you! :)
Comment 21 Frank Tobin 2014-01-30 04:05:11 UTC
Even if the KDE standard is to append the app name, I think it's reasonable to have an exception for terminal applications, as there are often multiple instances open, and the dynamic name is important in distinguishing from its siblings.  People often switch between terminals often, and appending the app name just generates noise when trying to distinguish the windows.

The standard works better for other apps where there aren't a multitude of windows open, where the user doesn't switch contexts often, or where the title wouldn't be dynamically informative.
Comment 22 Kurt Hindenburg 2014-01-30 13:47:47 UTC
Git commit db6d9de83ea19a16fbf759862c278468591573cf by Kurt Hindenburg.
Committed on 30/01/2014 at 13:38.
Pushed by hindenburg into branch 'master'.

Add option to remove '- Konsole' from window title

This may be overkill but for now add option to remove app name from
title.  The option is in the app-wide General Configure settings and
doesn't add unreasonable space to the dialog.

REVIEW: 115354
FIXED-IN: 2.13

M  +5    -1    src/MainWindow.cpp
M  +13   -0    src/settings/GeneralSettings.ui
M  +5    -0    src/settings/konsole.kcfg

http://commits.kde.org/konsole/db6d9de83ea19a16fbf759862c278468591573cf
Comment 23 Kurt Hindenburg 2014-02-07 14:33:21 UTC
Git commit 4d5a30c821eb2c7f11b130a355c33dde15d24cde by Kurt Hindenburg.
Committed on 30/01/2014 at 13:38.
Pushed by hindenburg into branch 'frameworks'.

Add option to remove '- Konsole' from window title

This may be overkill but for now add option to remove app name from
title.  The option is in the app-wide General Configure settings and
doesn't add unreasonable space to the dialog.

REVIEW: 115354
FIXED-IN: 2.13
(cherry picked from commit db6d9de83ea19a16fbf759862c278468591573cf)

M  +5    -1    src/MainWindow.cpp
M  +13   -0    src/settings/GeneralSettings.ui
M  +5    -0    src/settings/konsole.kcfg

http://commits.kde.org/konsole/4d5a30c821eb2c7f11b130a355c33dde15d24cde