Roland's homepage

My random knot in the Web

Setting the terminal title with urxvt and tcsh

Generally I use ssh from an urxvt terminal window running tceh to log into other machines. But since the title of all my urxvt windows defaults to “Shell”, it can get confusing.

To set the terminal windows’ title, I use the following command from the shell running in the terminal;

printf "\033]2;${HOST}\007"

This sets both the window title to the content of the $HOST environment variable.

If you use a window manager that can iconify windows, you should start the command with \033]0; instead. That will change both the window title and the icon name.


For comments, please send me an e-mail.


Related articles


←  Using Matroška containers for videos Initializing a new git repo for a project  →