www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/12/12:17:41

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4A82EB12.2040206@bopp.net>
Date: Wed, 12 Aug 2009 11:17:22 -0500
From: Jeremy Bopp <jeremy AT bopp DOT net>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Issue with the titlebar
References: <20090812155808 DOT 311470 AT gmx DOT net>
In-Reply-To: <20090812155808.311470@gmx.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019