Bug 169607

Summary: setting title with terminal codes doesn't work
Product: [Applications] konsole Reporter: Gabe Yoder <gabe.yoder>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: robertknight
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gabe Yoder 2008-08-22 20:30:22 UTC
Version:            (using KDE 4.1.0)
Compiler:          gcc 4.3.1 
OS:                Linux
Installed from:    Compiled From Sources

I have a command line application which explicitly sets the window title using terminal codes.  It uses the following snippet of code to set the title:

fprintf(stderr, "%c]0;%s%c", 0x1B, msg.c_str(), 0x07);
fflush(stderr);

This works in an xterm or konsole from KDE 3.5.9, but with konsole from KDE 4.1.0, the title isn't set (while the application is running I only get a title like "dirName : appName" when I expect to only get the contents of my msg string).  Has support for setting the window title been dropped, or have I missed some option to make it work properly?
Comment 1 Robert Knight 2008-08-23 15:41:25 UTC
Hello,

You need to change the title format used for tab/window text.  Go to Settings -> Edit Current Profile -> Tabs.  Clear the tab title format fields and click Insert -> Window Title Set By Shell

The default format is dirName : appName because it is much more useful than the defaults that ship with most shells.
Comment 2 Gabe Yoder 2008-08-23 20:29:03 UTC
Okay, that works.  You may want to change that part of the configuration a bit so that it is more clear that it affects the window title and not just the tab title (I never use the tabs, so I didn't really care what the title in the tab was).