Categories
Gnome Linux

Setting the title of PuTTY window.

Setting the title for PuTTY window is quite a simple trick. The trick is to set the PS1 with a escape sequence. When the PS1 is set with the escape sequence the variable will set the title window also. And not only can this trick be used in PuTTY but even on gnome-terminal to set the title dynamically. You can use this in the .bashrc or .bash_profile file to do it whenever you are starting the terminal.

export PS1=\”\\[\\033]0;$1 – \\u@\\h:\\w\\007\\]$PS1\”

Sometimes this does not work and then you can use the PROMPT_COMMAND to do this:

export PROMPT_COMMAND=\’echo -ne \”\\033]0;`pwd`\”; echo -ne \”\\007\”\’

2 replies on “Setting the title of PuTTY window.”

Good day!

Just introduce myself: I am a man (says my wife), I am 50 years old (hmm, that looks bad isn’t it?) and I am a terrible bad programmer (I say myself).
My hobbies: computer (of course), my 17 years old son and of course my wife. I like to play billiard, I do a very little bit and very simple programming in VB and I try to make a site for my billiard-club in the near future.

so how is everyone doing?? John from Payday Loans 🙂

This site uses Akismet to reduce spam. Learn how your comment data is processed.