The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Title your Terminal

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

If you launch the Terminal with the -t flag, you can assign a custom name to its title bar. For instance, type

Terminal -t "HappyTerm"

and you’ll get a new Terminal window called Happy Term, rather than the default name “Terminal 2.”

You can also change the title of the currently running terminal with the following sequence:


$ /bin/echo '33]2;My Term07'

Because this is a somewhat hairy sequence, you probably won’t want to type it in with any regularity. In that case, make the above into a little shell script. Save the brief script below in /boot/home/config/bin as a file called “term”

echo -e "33]2;$107"

You’ll then be able to type: term "My Term" at any prompt to change the title of the currently running terminal.


Peter Folk (pfolk@gargtech.com) adds:
The command from this tip wasn’t correctly quoted, so it didn’t make it through the HTML system. The correct command is below:

echo -en '\\033]2;TextInTitle\\007'

Posted in Terminal


(comments are closed).