title: Ubuntu: How to I add string to terminal window title from command line?
body: <p>I am working on a Ubuntu VM where i have multiple terminal windows open at the same time. I switch between them many times and it's hard to keep track of which window has which purpose. So what I want to do is to issue some sort of command from the command line that would permanently alter the title of the window. One approach is to modify the following line in <code>.bashrc</code> to, say, add the word <code>FOO</code> to the title:</p>
  
  <pre><code>PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@${InstName}:FOO:\w\a\]$PS1"
  </code></pre>
  
  <p>Then I would do <code>source .bashrc</code>. The problem is that I only have one <code>.bashrc</code> and many windows. So if I open two windows one after another without changing the line in <code>.bashrc</code>, I'll have <code>FOO</code> in both of them. So I want to issue a command from each window instead. How do I do that? </p>
  
  <p>NOTE: The stuff around <code>FOO</code> in the <code>PS1</code> line above is important too, so what I want is to essentially add a window-specific string to the generic <code>PS1</code> specification above.</p>