After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 84164 - honor icon name escape sequence
honor icon name escape sequence
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other other
: Normal minor
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-06-04 19:37 UTC by Peter Oliver
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to make g-t handle OSC 1 ; Pt BEL sequence (17.03 KB, patch)
2003-07-18 07:57 UTC, Mariano Suárez-Alvarez
none Details | Review
a better (as in this-one-really-works) patch (18.16 KB, patch)
2003-07-18 23:38 UTC, Mariano Suárez-Alvarez
none Details | Review

Description Peter Oliver 2002-06-04 19:37:48 UTC
Package: gnome-terminal
Severity: minor
Version: 1.9.6.0.200205311757 from Red Carpet
Synopsis: gnome-terminal uses window title instead of icon name
Bugzilla-Product: gnome-terminal
Bugzilla-Component: general

Description:
In an gnome-terminal, type 'echo -n "^[]1;icon^G^[]2;title^G"', where ^[
is ESC
and ^G is BEL.  The window title changes to "title".  The icon name
should change to "icon", but it too changes to "title".

Note that Window List has the same problem, for which I've logged a
seperate bug.

To see this working properly, try changing the window manager to twm and
iconify an xterm.  Twm will show it's own icons in addition to the ones
one the panel.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-06-04 15:37 -------

Reassigning to the default owner of the component, hp@redhat.com.

Comment 1 Mariano Suárez-Alvarez 2003-07-18 07:53:55 UTC
Here goes a patch that adds this to gnome-terminal (vte already
recognizes the control sequences, so it's rather easy)

I'm pretty sure this code is ok, but, of course, there is a glitch. I
can't see what it is but I think it might be exposing a bug in the
window-list panel-applet and/or libwnck.

To see it in action do (without changing workspaces until I say so):

1) start an xterm or a gnome-terminal (with the patch applied). If you
have a smart bash prompt, say PS1="";
2) say echo -e '\033]2;a window title\a'
It should have changed the window title and the window-list icon title
to `a window title';
3) now say echo -e '\033]2;an icon title\a'
This should have changed the window-list icon title to `an icon title'
without touching the window title
4) finally, say echo -e \033]2;a new window title\a'
Since now the window has _NET_WM_ICON_NAME set, this should just
change the window title and leave the window-list icon title alone,
but it does change both. There is the rub.
5) *But*, now change to another workspace and then back again. The
titles are ok now, ie window title is `a new window title' and icon
title is `an icon title'

I could not decide whose fault is this; it's not my patch's though,
because you can do this with xterm's too, and xterms do handle those
control sequences ok (they invented them?)
Comment 2 Mariano Suárez-Alvarez 2003-07-18 07:57:28 UTC
Created attachment 18408 [details] [review]
patch to make g-t handle OSC 1 ; Pt BEL sequence
Comment 3 Mariano Suárez-Alvarez 2003-07-18 23:37:26 UTC
I figured out the ugly behaviour in my last comment is due to libwnck,
and reopened its bug 17994, whose fix probably caused that.

Next is a replacement to the above patch, which is needed because we
need to know which tabs have set their icon titles and which haven't:
we need to simulate the fact that the wm uses _NET_WM_NAME for the
icon only when _NET_WM_ICON_NAME has not been set. If notebook-based
mdi were handled by the wm, this would not happen.
Comment 4 Mariano Suárez-Alvarez 2003-07-18 23:38:30 UTC
Created attachment 18423 [details] [review]
a better (as in this-one-really-works) patch
Comment 5 Havoc Pennington 2003-07-19 17:38:42 UTC
This patch looks good, but is probably on the borderline of 
feature vs. bugfix with respect to the freeze. Might want 
to ask release-team@gnome.org what their view is.
Comment 6 Mariano Suárez-Alvarez 2003-10-13 02:56:03 UTC
Committed to HEAD.