[Lancaster] perl script to change your xterm title

Andy Baxter andy at earthsong.free-online.co.uk
Wed Jun 4 23:28:01 2003


On Wednesday 04 Jun 2003 2:57 pm, you wrote:
> > Do I get the 'sad linux geek' badge and t-shirt?
>
> I'd say so ... that's neat, thanks.
>
> What's going on here, are these the old ANSI control characters ?

This is the relevant bit from man xterm:

 Many of the special xterm features may be  modified  under
       program  control through a set of escape sequences differ­
       ent from the standard VT102 escape  sequences.   (See  the
       Xterm Control Sequences document.)

(so they're not VT102 in fact, but specific to xterm) Then i found 
/usr/share/doc/xterm/ctlseqs.txt.gz which documents all the control sequences 
xterm recognises...

"VT100 Mode
Most of these control sequences are standard VT102 control sequences,
but there is support for later DEC VT terminals (i.e., VT220 and VT320),
as well as ISO 6429 and aixterm color controls.  VT102 features not sup­
ported are auto-repeat and blinking characters.  There are additional
control sequences to provide xterm-dependent functions, such as the
scrollbar or window size.  Where the function is specified by DEC or ISO
6429, the code assigned to it is given in parentheses.	The escape codes
to designate and invoke character sets are specified by ISO 2022; see
that document for a discussion of character sets."

Note that although xterm recognises both single character and double 
character codes to start an escape sequence, (e.g. chr(0x9d) and 'ESC ]' both 
mean 'operating system command'), the other terminals like eterm and 
gnome-terminal only recognise the double character version. (don't know about 
konsole)

andy.