delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/11/16:01:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; q=dns; s=default; b=CbUP
2LXegFFokuWUoDORbfAC6crJUzVEcC5u3ev2BHFelilKT0jrORJntG0WVjEPqgtm
Il2pMZZDC3V/CWehIKisxH1J54PGn2KFZ0cE5nize+v/R4cAqNVzURRbuc+Z7F2C
AbFYmw7KQ1S2yGha3Bg6y94ObDuXRwFyH3x0NUA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; s=default; bh=hTFHaLZH32
ZW8PORfsVMchWWQc8=; b=O7ntWmRt3faxnZcnlswKSP9RLWjz9WsBvhOmXe7y6b
c/+2x6tXGJw4JsWvBDjElcl4L9HVJQvxFInHOWKN69OJC46CCocZA1ayRAVo2q+t
4bW8Rm8XDIpdeNyaJPuSeCbRYqsaVuVS1Nw7LvWnamy31brBMLXMxYI0NyO34bGu
c=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_20,SPF_PASS autolearn=ham version=3.3.2
X-HELO: northrend.tastycake.net
Date: Fri, 11 Apr 2014 21:00:40 +0100
From: Adam Dinwoodie <adam AT dinwoodie DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: setting cygwin terminal (mintty) title from a very remote system
Message-ID: <20140411200040.GA28630@tastycake.net>
References: <53483EC3 DOT 6010707 AT biostat DOT ucsf DOT edu>
MIME-Version: 1.0
In-Reply-To: <53483EC3.6010707@biostat.ucsf.edu>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-IsSubscribed: yes

On Fri, Apr 11, 2014 at 12:13:07PM -0700, Ross Boylan wrote:
> I typically connect to systems through several hops; this note is
> about how I managed to set the title of the cygwin terminal to match
> the remote system.  Usually it just shows the name on the first hop
> only.   I would love to learn there is a better way to get the same
> results.
> 
> Various internet sources advise things like
> 
> echo -ne '\e]0;Title\a'
> 
> to set the window title while noting that the default cygwin prompt
> sets this automatically.  This did not work for me initially, but I
> found a way to get it to work.
> 
> On the remote system the prompt does not contain any window titling
> commands.
> 
> Concretely, my connection sequence looks like this.
> 
> From System A, running Windows 7, launch a cygwin bash shell.
> In that shell, ssh to system B.  B's name will appear in the title bar.
> From B ssh to C.  Neither this nor later operations change the title bar.
> From C ssh to D.
> On D, run screen.
> In screen, run emacs.
> In emacs start a (bash) shell.
> 
> I want the name of system D to appear in my title bar.
> Systems B-D are running various versions of Debian GNU/Linux.
> The echo command from within the bash prompt is ineffective.
> 
> If I start a new shell from within screen (Ctl-a c), the echo
> command works from there.

Fundamentally, this is nothing to do with Cygwin.  MinTTY will change
the terminal title if it receives the escape sequence to do so.  The
title will stay the same if something intercepts that sequence, and it
will probably appear to stay the same if something resets it immediately
(many Bash shell prompts do just that).

When you type at that shell, your keystrokes are passed from MinTTY
through to the first ssh session, through to the second, through to the
third, through to Screen, through to Emacs, through to the final Bash
shell.  Characters printed back, including the escape characters that
set the terminal, go through the same sequence in reverse.  Something in
that chain, for you, is intercepting those escape characters.

We don't have access to your setup to work out where that is.  I'd
suggest going step-by-step through each connection and trying to change
the terminal title, to work out where it is.  At that point you need to
work out *why* the change isn't working, and since this really doesn't
sound like a Cygwin problem, this isn't the right place to get help.
I'd suggest asking a question on Super User.

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