From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11088 invoked by alias); 11 Apr 2014 20:00:47 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 11076 invoked by uid 89); 11 Apr 2014 20:00:46 -0000 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 Received: from northrend.tastycake.net (HELO northrend.tastycake.net) (212.13.201.165) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Apr 2014 20:00:43 +0000 Received: from adam by northrend.tastycake.net with local (Exim 4.80) (envelope-from ) id 1WYhcu-0000Bl-34 for cygwin@cygwin.com; Fri, 11 Apr 2014 21:00:40 +0100 Date: Fri, 11 Apr 2014 20:00:00 -0000 From: Adam Dinwoodie To: cygwin@cygwin.com Subject: Re: setting cygwin terminal (mintty) title from a very remote system Message-ID: <20140411200040.GA28630@tastycake.net> References: <53483EC3.6010707@biostat.ucsf.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53483EC3.6010707@biostat.ucsf.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00304.txt.bz2 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