[clug] Terminal Control Sequences

Scott Ferguson prettyfly.productions at gmail.com
Sat Jul 3 19:59:27 MDT 2010


On 04/07/10 04:00,moncojhr <moncojhr at gmail.com>
> To: linux at lists.samba.org
> Subject: [clug] Terminal Control Sequences
> Message-ID:
> 	<AANLkTinO9p_4lz32MBH1SROKcLXEYAHq_kiAKmWYv1Cy at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> 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!
>
>
>   
You can use the xterm control sequences to set the window title:
ESC ] 2 ; your_title BEL

For example,

/echo -e '\033]2;Hello\007'/

will make 'Hello' to be your title (the 2 means 'set both the window
title and the icon title; other values are 0 and 1 which only affect
one of them)

Useful References: man gnome-terminal, text-terminal-howto, and, man
console_codes
For more info try http://people.gnome.org/~mariano/ (one of the main
gnome-terminal developers)

Cheers


More information about the linux mailing list