How to configure the default shell in msys2/mintty?
Asked Answered
C

3

6

I updated msys2 recently and found mintty always shows 'Shells (bash)' dialog before it invokes.

Shells (bash) dialog

It's little bit annoying to click the button every time, how can I suppress this dialog with fixing the default shell? Mintty version is mintty 2.7.7 (x86_64-pc-msys).

Corunna answered 14/6, 2017 at 5:45 Comment(0)
F
5

Try installing the msys2-launcher package with pacman -S msys2-launcher. Then you should have three executables in the MSYS2 installation directory, and you should run the shell using those executables. You can then pin the shell to your Windows taskbar for future launching.

Forerunner answered 14/6, 2017 at 14:59 Comment(1)
Thanks. After I installed msys2-launcher then I found mingw32.exe, mingw64.exe and msys2.exe in 'C:\msys64' folder.Corunna
H
3

I tried installing msys2-launcher, but could not find the package.

Instead, I updated the Target field in my Windows shortcut to point to the msys2 bash directly:

C:\msys64\usr\bin\mintty.exe /usr/bin/bash
Hiro answered 5/3, 2018 at 15:24 Comment(0)
L
1

Try this one: D:\msys64\usr\bin\bash.exe -c 'MSYSTEM=MSYS exec /bin/fish -l -i'

The 'MSYSTEM' variable could be MSYS, MINGW32, MING64. And the command can be integrated to terminal emulator like consolez, cmder. mintty.exe won't allow you do that since it's not console application.

Loan answered 17/5, 2019 at 8:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.