Bug 169607 - setting title with terminal codes doesn't work
Summary: setting title with terminal codes doesn't work
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-22 20:30 UTC by Gabe Yoder
Modified: 2008-08-23 20:29 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 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).