GNOME Bugzilla – Bug 84164
honor icon name escape sequence
Last modified: 2004-12-22 21:47:04 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.
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?)
Created attachment 18408 [details] [review] patch to make g-t handle OSC 1 ; Pt BEL sequence
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.
Created attachment 18423 [details] [review] a better (as in this-one-really-works) patch
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.
Committed to HEAD.