> From: cygwin-xfree-ow...@cygwin.com [mailto:cygwin-xfree-
> ow...@cygwin.com] On Behalf Of Ajay Jain
> Sent: Sunday, May 09, 2010 9:39 PM

> 1) Do an xterm -T "mercury" to open up xterms with titles.
> 2) Do an ssh on mercury to login to linux box.
> 
> I face the following issues -
> 
> 1) The name of the new window is not mercury, it has now changed.
> Since I need to open many such windows, I need to name them. Can you
> tell me how to accomplish the same?

        Put this in every one of your .bashrc files (i.e. on every machine):

set_title() {
        echo -ne "\033]0;$*\007"
}

        Then if your autogenerated files gank your title, you can gank it right 
back:

$ set_title mercury

        Here's a more complete setup:

setup() {
        set_title `hostname`
        export PS1='\h$ '
        unalias PROMPT_COMMAND
}

        Which gets rid of the "write a term title after every command" 
cutesiness.

        Best solution is to learn how the setup files work and modify them to 
suit yourself.


        HTH,

Mike

Reply via email to