Putting Text in Window Title Bars
itworld.com
itworld.com
What actually matters for this is the declared terminal type, and the terminal program you're using.
In this case, the article uses sequences I don't recognize and doesn't specify what terminal is supposed to support them. None of their echoes work for me.
But perhaps a more common and supported approach is xterm:
- use a terminal program that supports and declares the right type, e.g. "xterm-color"
- use xterm-style title sequences, and "printf" to print them, such as:
printf "\033]; `pwd` \007" > cat `which title`
#!/usr/bin/perl
print(
"\x1b",
"]2;",
join(' ', @ARGV),
"\x7",
);