how to set title from command line

Asked by alberto

Hi,

I really like sakura. There is one thing that I do not understand: how the window's title is set.

when I run some programs they change the title of the terminal and it is cool but I don't know how they do it. Moreover, when they finish, the title is not really right.

For example, when I use emerge to install some packages, the window title is "installing package 2 of 7". Once finished the title is root@:

How is it controlled/set?

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Sakura Edit question
Assignee:
No assignee Edit question
Solved by:
alberto
Solved:
Last query:
Last reply:
Revision history for this message
David Gómez (dabisu) said :
#1

Hi Alberto. Programs can change the title using escape sequences. Or to express it more precisely, when they send a escape sequence they ask for the title to be changed. A title_changed signal is generated and sakura decides whether or not to honor it.

Revision history for this message
alberto (astor86) said :
#2

thanks for reply

would you mind to share a quick reference or sample code to set/update the title?

thanks

Revision history for this message
alberto (astor86) said :
#3

for me worked

echo -e '\033]2;'my-title'\007'