Как я могу использовать mintty в качестве эмулятора терминала для MinGW / MSYS?

4422
Ben Blank

Стандартный эмулятор терминала в Windows оставляет желать лучшего. Я считаю, что mintty рекомендуется в качестве облегченной альтернативы со специальной поддержкой MinGW / MSYS, но не так много информации о том, как на самом деле использовать ее как таковую.

Как я могу поручить MinGW / MSYS использовать mintty?

6

1 ответ на вопрос

4
Ben Blank

Mintty is indeed well supported by MinGW/MSYS; in fact, much of the configuration is already done and waiting to be activated.

  1. Install mintty. This can be done either at the MinGW command line or via the MinGW Installation Manager

    From the MinGW command line, run mingw-get install mintty. It takes a few moments to download and install the mintty packages, after which you can exit the shell.

    Alternatively, you can select and install the "msys-mintty" packages via the MinGW Installation Manager.

  2. Configure MSYS. Next, you need to edit the shortcut you use to run the MinGW shell. By default, this is a link named "MinGW Shell" located in the "C:\MinGW\msys\1.0" folder. Right-click the link and select Properties.

    Wherever you find your link, the Target should be "C:\MinGW\msys\1.0\msys.bat", potentially with some command-line arguments following it. If an argument selecting a shell is already present (such as --rxvt), remove it.

    Finally, add --mintty as the first argument after "msys.bat". (Often, this will end up being the only argument, but if not, it's important that it be the first.)

Now, when launching the MinGW shell through that shortcut, mintty will be used instead of the Windows terminal emulator.