Install mintty for MSYS

Post date: Oct 12, 2010 11:16:46 PM

The MinGW Shell shortcut has a great icon, but is missing some things like scroll-wheel support and copy/paste. It's running inside Windows cmd.exe, and is subject to it's limitations. You can run MinGW's sh.exe inside a different terminal emulator.

Console2 is a good choice, but I prefer mintty. It's source code started from PuTTY, which is my favorite remote terminal.

Download

Easy way:

    • Run msys.bat

    • Run mingw-get install mintty.

      • This can take over a minute to begin downloading.

Original way:

Building the latest release:

Create MSYS shortcut

    • Open {MinGW install directory}/msys/1.0/ in Windows explorer.

    • Create a shortcut to msys.bat.

    • Rename the shortcut to "MSYS".

    • Right-click the shortcut, and select "Properties".

    • Change the icon to use one from C:\dev\MinGW\msys\1.0\bin\mintty.exe.

    • Append the argument after the "Target". It should look like this:

      • C:\dev\MinGW\msys\1.0\msys.bat --mintty

    • Move/copy the shortcut wherever you'd like it to be, such as Desktop or Start menu.

Configure mintty

    • Double-click the shortcut to start MSYS in mintty.

    • Right-click the title bar, and select "Options...".

      • Text: You can change the font and character set here

      • Keys: Set keyboard shortcuts here

      • Mouse: I changed "Right-click action" to "Paste", to match PuTTY's behavior

      • Window: Change the startup columns and rows, scrolling, and exit confirmation

      • Terminal: You can set printer, TERM variable, and Bell behavior

Using mintty

Copy: After you highlight something, it's copied to the Windows clipboard. No need to go to the menu. If you double-click, a word will be highlighted and copied. If you triple-click, the entire line will be highlighted and copied.

Paste: By default, middle-click will paste the clipboard contents. I changed it to "Right-click".

Scrolling: You can scroll up and down using the scroll-wheel. If you hold "Shift", each move scrolls an entire page.

Override click action: You can override "Right-click to paste" by holding "Shift" while right-clicking.

Refresh: Press "Control-L" to clear the page or refresh "vim"

The main problem to be aware of is that certain interactive prompts, and programs made with curses interface will not work. Be prepared to fall back to the cmd.exe console sometimes!