Change the title of a terminal (Gnome)

Posted by Kevin on Server Fault See other posts from Server Fault or by Kevin
Published on 2010-12-27T11:24:43Z Indexed on 2010/12/27 11:55 UTC
Read the original article Hit count: 227

Filed under:
|

I would like to customize the name of the tab in Tilda (I guess that it doesn't change anything from the Gnome-terminal's behavior), but I can't find the exact sequence ...

so far, I figured out that Bash does it when displaying my PS1 prompt:

echo $PS1
\[\e]0;HELLO\a\]\[\033[01;32m\]\u\[\033[00m\]@\[\033[1;35m\]\h\[\033[00m\]:\[\033[01;34m\]\[\033[00m\]

I guess that \[\e]0;HELLO\a\] is responsible for the title to be set to 'HELLO', but when I start

echo -ne "\[\e]0;HELLO WORLD\a\]"

only writes '[]'

what's wrong with my command ?

© Server Fault or respective owner

Related posts about terminal

Related posts about tab