This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Issue with the titlebar


Kilian Krockauer wrote:
> Hello there,
> 
> I have quite a disturbing task my colleque gave to me. 
> He uses CygWin and has up to 10 Windows opened, now he's getting tired of looking through every single Window when he searches for a specific one. To be exact, he uses ssh to connect to our servers and wants the titlebar to show which server that specific window is logged on to. 
> Is that even possible? I've gone through the web and found nothing helpful. I know that you can let the titlebar show a process name, the full path and i guess even the Hostname, because it is a variable, but everything i tried did not show the Hostname of the server he logs on to. 

If your colleague is using an xterm-compatible terminal such as mintty
or rxvt and bash as his shell on the remote machine, he can prepend the
following text to his PS1 environment variable within his .bash_profile
file:

'\[\033]0;\u@\h:\w\007'

e.g.)

PS1='\[\033]0;\u@\h:\w\007'$PS1

In this case, this text will cause the title to be set to
username@hostname:working/directory. The \u@\h:\w is the part he can
change, and those escaped letters are standard bash escapes for prompts.
 Search for PROMPTING in the bash manpage for more about those escapes.

This document also appears to be fairly helpful:

http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

-Jeremy


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]