I have successfully used a script to modify putty's window title for many years. It has worked great in a Solaris 10 environment, using, sh, bash and tcsh. But I've never been able to get it to work in linux
The script relies on sending escape sequences via gnu echo. The version of echo on both solaris and linux is exactly the same:
/bin/echo --version
echo (GNU coreutils) 5.97
The terminal client is putty 0.62, issued from a PC running Win7. The connection is via an ssh session.
For example, this works:
% /bin/echo "\033]0; JUST TESTING \007\c"
When it succeeds, nothing is echoed in the CLI session, and instead putty's window title changes to "JUST TESTING".
When if fails, it does nothing to putty's title, and instead echoes out this to the CLI session:
% /bin/echo "\033]0; JUST TESTING \007\c"
\033]0; JUST TESTING \007\c
I've tried, without success, all of these combinations (and more):
/bin/echo \\033]0\\; JUST TESTING \\007\\c
/bin/echo \\033]0\\; JUST_TESTING \\007\\c
/bin/echo \\033]0\\;JUST_TESTING\\007\\c
/bin/echo \\033]0\;JUST_TESTING\\007\\c
/bin/echo \033]0\;JUST_TESTING\\007\\c
/bin/echo "\033]0; JUST TESTING \007\c"
/bin/echo '\033]0; JUST TESTING \007\c'
/bin/echo \033]0\;JUST_TESTING\007\c
/bin/echo \033\]0\;JUST_TESTING\007\c
/bin/echo \\033]0\\;JUST_TESTING\\007\\c
/bin/echo \\\033]0\\\;JUST_TESTING\\\007\\\c
FWIW It works on the solaris system even if I first ssh to the linux system and then to the solaris system, so the packets are routed through the linux system on its way back to my PC.
Any ideas on how I can get this working would be greatly appreciated!
Thanks,
-Bob
Andover, MA US