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.


←  Compiling asymptote for TeXLive on FreeBSD Initializing a new git repo for a project  →