www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <j2g1d00e1c71004222337pa5d8a6c9h394c7b96383cc963@mail.gmail.com> |
References: | <j2g1d00e1c71004222337pa5d8a6c9h394c7b96383cc963 AT mail DOT gmail DOT com> |
Date: | Fri, 23 Apr 2010 12:35:15 +0100 |
Message-ID: | <v2j416096c61004230435jf50f9dcfzb7e9e161b92c15de@mail.gmail.com> |
Subject: | Re: Is 256 colors possible with cmd.exe? |
From: | Andy Koppe <andy DOT koppe AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
Alex Leigh: > So my question is, is it possible to get 256 colors > with Cygwin running on top of cmd.exe? As Corinna already said: nope. Windows represents console colours with only four bits: red, green, blue, bright: http://msdn.microsoft.com/en-us/library/ms682013%28v=VS.85%29.aspx Only thing you can do is change the resulting 16 colours in the console properties. (A bit of pedantry: Cygwin programs don't run on top of cmd.exe; they run in console windows. On Windows 7 those are managed by conhost.exe. Cmd.exe is just another program that runs in a console window.) > If this is not possible, then does anyone have any advice on ways to > have compatibility with both Unix terminal features including 256 > color and Windows console programs within a single terminal app? The > only solution of this sort I've found is conin.exe from the developers > of mintty. It does provide half the solution in that it allows input > to be piped from mintty to Windows console programs, but unfortunately > it's not possible to see the output from those programs. Conin isn't quite that useless. It works ok for programs that only depend on stdin being a console, e.g. python, scala, and cmd.exe, although there are quirks. With others such as the mysql client, output does work, but you don't get a prompt because it checks whether both stdin and stdout are consoles to decide whether to enter interactive mode. Output will fail completely though when programs use console-specific output functions, in particular WriteConsole and WriteConsoleOutput. Which programs are the problem cases for you? Andy -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |