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: setting cygwin terminal (mintty) title from a very remote system

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:
Unsubscribe info:

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