How to set xterm for Window Titls for PuTTy

Hi,
I still cant find step by step manual how to make my putty display let say PWD in its title, read about some xterm, but where it is?
Can anybody help me with this.

Thx
M

Put this snippet either or in both .bashrc or .bash_profile if you are using bash shell

export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
2 Likes

Thanks, H
I afraid that its still promt, I'm looking to change <window title> on putty app, which is on very top on blue background.

Thanks
V

Tested in bash:

On bash shell prompt :

 echo -ne "\e]2;${PWD}\a";

From putty FAQ:

PuTTY allows the server to send xterm control sequences which modify the title of the window in mid-session (unless this is disabled - see section 4.6.5); the title string set here is therefore only the initial window title.

It works for me like charm , I have attached a photo as a proof
OS : AIX
Shell : bash
$TERM: xterm