[clug] Terminal Control Sequences

David Schoen dave at lyte.id.au
Sat Jul 3 17:38:53 MDT 2010

Chances are $PROMPT_COMMAND has a value and is causing the title to be
updated back to what your distro has configured immediately after
running your command to update the window title.

Try this (I'm assuming bash):
$ echo -ne '\033]0;Window title here\007' > /tmp/test
$ cat /tmp/test

That should statically update the window title once.

Chances are you want to do something more sophisticated though.

I use a prompt command that displays the current time (useful if you
start something that runs a long time and forgot to run it in 'time')
it also displays the exit status for the last command. Neither of
which are absolutely required, but they can be quite useful when
something runs unexpectedly long or fails in a non-obvious way.

On 4 July 2010 03:53, moncojhr <moncojhr at gmail.com> wrote:
> Hi Everyone,
> I have been looking into what exactly is available/what i can do with
> control sequences within gnome-terminal.
> Now I have practically no idea about "terminals" or the control sequences
> themselves and everywhere i've looked seem to just have crazy stuff that
> either, I'm typing incorrectly or do not work within gnome-terminal.
> One of the things id like to know is if I can change the window title with
> control sequences, and if I can, can i enter that sequence in a text file
> and cat out the text file and have my window title change.
> If you could give me any tips or where I should be looking for this
> information it would be great.
> Cheers!
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux

More information about the linux mailing list