delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/17/15:16:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Backus <eric_backus AT agilent DOT com>
Subject: Re: [ANNOUNCEMENT] Updated: mintty-0.5.1-1
Date: Sat, 17 Oct 2009 19:16:12 +0000 (UTC)
Lines: 49
Message-ID: <loom.20091017T204755-760@post.gmane.org>
References: <announce DOT 416096c60910121133u54b2cea7m2955e55d6c0d6564 AT mail DOT gmail DOT com> <loom DOT 20091016T193038-322 AT post DOT gmane DOT org> <416096c60910161104t1d5c1174oab298aeea800cdbf AT mail DOT gmail DOT com> <loom DOT 20091017T034020-502 AT post DOT gmane DOT org> <416096c60910162320j2322969dq235f71396d00d329 AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
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

Andy Koppe <andy.koppe <at> gmail.com> writes:

> > The obvious method would be to check $TERM,
> > but of course that doesn't work...
> 
> ... and I can't change it to "mintty", because even if entries for it
> were added to Cygwin's termcap and terminfo, any other system would
> say "what?".

Yes.  Though you could set a different variable ($MINTTY_VERSION perhaps) that 
would allow users to explicitly test whether they're running under mintty.  I 
don't know if this is a good idea or not.  Possibly better would be some 
generic variable (TERM_IMPLEMENTATION?  TERM_EMULATOR?  I can't think of 
anything that looks very good) that other programs could use too.


> You could change it though, e.g.:
> 
>   mintty env TERM=mintty /bin/bash -l

This is an excellent idea.  Thanks!  I ended up using:

    mintty --title=bash env MINTTY_VERSION=0.5.1 bash --login

Then my .profile can test for MINTTY_VERSION and unset the variable when done.


> Alternatively, mintty can be recognised by querying the "secondary
> device attribute". If you send "\e[>c", it will currently reply with
> "\e[>77;501;0c". The 77 (ASCII 'M') identifies mintty, the 501 is the
> version number, and the last field is unused.

Cool, I never knew about this.  I can make it work, but things are a little 
messy so I'll stick with the environment variable method above.


> Btw, how do you deal with the problem that the 'kbs' terminfo entry on
> the remote machine doesn't necessarily fit the terminal on your local
> machine?

There's not much I can do about it, so I don't deal with it.  I don't use 
terminals on remote machines very often, so it hasn't been a problem for me.  
I guess the long-term right answer is for everyone to agree on the same 
definition of what "xterm" really means.

By the way, thanks for your efforts on mintty, it works really well and I have 
enjoyed using it.
-- 
Eric


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