GNOME Bugzilla – Bug 64073
echoing the 7 bit 'OSC 0; %s ST' escape sequence hangs gnome-terminal
Last modified: 2004-12-22 21:47:04 UTC
Hi, There are certain escape sequences which, when echoed to stdout or stderr (or even stdin, weirdly enough) by an application using an instance of a <thing sufficiently like an xterm to behave like one>, control the behaviour of said terminal-emulator. They are documented in '/usr/share/doc/xterm/ctlseqs.txt.gz', which is part of the xterm package. There are symbolic names for the character sequences that make up these control sequences, since they can exist in both 7bit encoded and 8bit encoded forms. The sequences: OSC 0; STRING BEL and OSC 0; STRING ST which can be passed to the termianl program by the following echo commands: echo -ne "\033]0;STRING\007" and echo -ne "\033]0;STRING\033\\" respectively, are both supposed to set the title of a <terminal emulator> to STRING. The BEL terminated version of the sequence works in gnome-terminal, but the ST terminated sequence does not - my first guess would be that gnome-terminal does not recognise that the ST sequence terminates a control sequence, and therefore just sits there, witing for the command to complete, which of course it never does. Therefore, if I launch a gnome terminal, it gets as far as trying to emit the ST version of the sequence (my .bashrc does this), and just hangs. This may well apply to other control sequences that have ST and BEL as alternative terminators.
Created attachment 6031 [details] [review] Recognise 2 character escape sequence terminator
This is fixed by the patch committed against bug 65154 - if that patch stays in, this one can be dropped.