Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have installed cygwin (i'm not very experienced with it), and try to run a native windows shell application from it, (msbuild.exe which is the build tool for the .NET framework, to be exact).

When I run the application from the normal cygwin bash shell, the output of the application appear as it should with the text colors that I would normally see in the windows command line.

But when I execute the program from a mintty terminal, there is no coloring of the output, all text is in the default foreground color. I'm puzzled, because I would have expected the color coding to be the standard ANSI color code escape characters...

Can this be fixed?

share|improve this question
    
Do Cygwin programs (emacs, mc) give you color in mintty? –  Dennis Williamson Sep 3 '10 at 14:06

2 Answers 2

up vote 3 down vote accepted

The application most likely uses Windows console APIs rather than ANSI color sequences. Mintty is a Unix terminal (based on Cygwin's pty implementation) rather than a Windows console wrapper though, hence those console API calls will have no effect.

There's currently no way to make this work in mintty, although there are various rather complex ideas on how the issue could be addressed at http://code.google.com/p/mintty/issues/detail?id=56. Meanwhile, the workaround is to just start the program in question in a console window. The 'cygstart' utility is a convenient way to do that.

share|improve this answer

Native Windows console programs often don't run well inside Cygwin terminal emulators such as mintty. See the Cygwin documentation for an explanation. Not seeing colors is one possible symptom; a worse symptom is not being able to type into the application.

There are alternative console programs that are much better than the built-in console. My current choice of terminals under Windows is mintty for cygwin or stdio programs and console2 for Windows console programs. The topic has been discussed several times on this site already:
http://superuser.com/questions/66581/advanced-command-line-editing-for-windows
http://superuser.com/questions/87441/alternative-windows-command-shell-and-console
http://superuser.com/questions/35636/windows-cmd-replacements
http://superuser.com/questions/167924/free-cmd-powershell-replacement-with-normal-copy-paste

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.