I generally see the syntax for setting the terminal title as (something like):
echo -e '\e]0;Some Title\a'
But I noticed this answer used 2
instead of 0
, which prompted me to do a little more digging. According to this document you can actually set both the "icon name" and the "window title" with this syntax:
· ESC]0;stringBEL -- Set icon name and window title to string · ESC]1;stringBEL -- Set icon name to string · ESC]2;stringBEL -- Set window title to string where ESC is the escape character (\033), and BEL is the bell character (\007). Printing one of these sequences within the xterm will cause the window or icon title to be changed.
But it doesn't go on to explain what exactly it means by "icon title" or "icon name". When I try it out I don't see any difference between 0
and 2
, and 1
doesn't appear to do anything.
So what is the "icon title", and what is supposed to happen when 0
or 1
is called?
Best Answer
This is X11 code perhaps ignored or unimplemented by modern Window Managers. Luckily, I don't run a modern Window Manger, so with FVWM on OpenBSD, I can set the icon name to
blah
, then minimize that xterm:Which produces an icon with that name.