setup and mintty (was Re: New setup.exe release?)
Mon May 23 16:05:00 GMT 2011
On May 23 11:33, Charles Wilson wrote:
> On 5/23/2011 7:50 AM, Corinna Vinschen wrote:
> > On May 20 17:09, Yaakov (Cygwin/X) wrote:
> >> The setup.exe download is still 2.738. Could it be updated to 2.749
> >> to include jturney's recent bug fixes?
> > I'd like to fix the mintty issue first.
> > So, do we swtch to mintty as default terminal, yes or no?
> Uhm, maybe? :-)
> Here's the deal: run the following program from the ncurses-demo package:
> in a mintty terminal and bash-in-cmdbox, with the same UTF-8 $LANG
> settings (I've tried C.UTF-8 and en_US.UTF-8). FWIW,
> TERM=xterm-256color in mintty, and TERM=cygwin in bash-in-cmdbox.
> In the former, I see pseudo-line drawing characters (e.g hyphens and
> plus signs, etc), but in the latter I see real line draw characters.
> I suspect the reason is the terminfo settings for mintty (e.g. for
> xterm-256color) specifies
> (inherited via terminfo 'use' statements from xterm-basic), while the
> terminfo settings for cygwin specify
> e.g. the cygwin entry explicitly uses high codepoints for various line
> draw stuff, (and cgywin's own terminal handling code does the magic to
> replace them with unicode linedraw? or something?)
Something. I don't know how mintty works, but the Cygwin console knows
the "switch to/from alternate charset" command "ESC [ 11 m", "ESC [ 10
m". The alternate charset is always codepage 437 which has the line
drawing chars at known single-byte positions in the >= 128 region.
This is apparently used by ncurses when running in a console window,
but perhaps not when running in mintty.
Whatever that is, I guess it may not be overly tricky to implement in
mintty as well, *if* somebody takes the time to report the problem.
> My point: there are some things that don't yet seem to work "right" in
> mintty, and I'm not really sure where the problem is.
What is the difference to the Cygwin console exactly? I'm sure, if you
look a bit below the surface, you will easily find bugs in the Cygwin
console implementation as well. It's all about getting bug reports or
even testcases. Just because there are bugs in mintty and the Cygwin
console doesn't mean both are unusable as default terminal.
> 1) does mintty need to do magic linedraw character rewriting,
> replacing what APPEAR to be attempts to print line draw chars with
> unicode linedraw glyphs? (ugh. heuristics. I hate heuristics. They
> always guess wrong sometimes.)
Btw., why is it so bad to have ASCII replacement chars? They just
work, even if they look ugly to some people.
> 2) do we need an explicit mintty terminfo entry, with a 'better' acsc
I don't think so. If at all, it's just some shortcoming in the current
implementation, something which can be fixed or added.
> 3) Maybe there is some magic combination of envvar TERM/LANG,
> settings, mintty options, font choices, etc, that will make linedraw work?
Windows fonts are unicode anyway, and the line drawing chars are
part of the unicode codeset. I guess a translation table from
CP437 to unicode line drawing chars and support of the alternate
charset setting should do it.
> > If we switch to mintty we don't need the Cygwin.bat file anymore. But,
> > shouldn't we keep it anyway for people who maintain some handmade symlink
> > to it?
> > If so, should we stick to the content of Cygwin.bat as is, or should
> > we change it to call mintty, too?
> as-is. What if you really WANT to use cmdbox? How else can a
> cygwin-shell-in-cmdbox be started, other than a .bat file of some kind?
> And since that's the only real way to do so, we ought to provide the file.
You can simple create a Windows shortcut to bash.exe, edit it to
add a --login option, and that's all you really need.
> > And who's going to create the patches?
> Well, my proposal is a one-liner in setup.exe: just change the target of
> the shortcut created in the Start Menu.
I don't think it makes sense if the desktop shortcut and the menu entry
behave differently. The desktop shortcut is the first thing new users
see, and this shortcut should start mintty in the first place. Just
as the menu entry since they should do the same.
> > Last but not least, shouldn't we add mintty to the Base package
> > anyway, independently of what we do to setup?
> I think so.
> However, if we do change setup.exe, then mintty should later be updated
> to eliminate its postinstall/preremove scripts. We don't need TWO
> shortcuts to the same proggie.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
More information about the Cygwin-apps