1

I'm trying to configure Tower (git client) to launch a wsl bash shell. I've tried a whole bunch of things, but it seems this isn't intended.

enter image description here

What I tried:

command:     c:\windows\system32\wsl.exe
parameters:  bash -i

command:     c:\windows\system32\bash.exe
parameters:  -i

command:     c:\windows\system32\cmd.exe
parameters:  /c "bash -i"

command:     c:\windows\system32\bash.exe
parameters:  -i

command:     c:\WINDOWS\System32\windowspowershell\v1.0\powershell.exe
parameters:  wsl bash -i

command:     cmd 
parameters:  /c start start bash -i

command:     C:\Windows\SysWOW64\cmd.exe
parameters:  /c start start bash -i

All of these just pop-up a console window for a very short time and then return to Tower.

Most of these commands work from the explorer window...

windows cmd

4
  • Did you try any other open source free git client like GitHub desktop?
    – Biswapriyo
    Dec 3, 2018 at 19:26
  • @Biswapriyo not sure how that would help. I simply want to launch a wsl bash shell directly from Tower. I already like and use Tower. I'm not looking for another git client replacement. Dec 3, 2018 at 19:27
  • Looks like this may be an issue for x86 windows applications not picking up the Windows x64 Filesystem redirection (stackoverflow.com/a/41757861/736079) Dec 3, 2018 at 19:36
  • Looks like github.com/goreliu/wsl-terminal is an option, though I'd like to not depend on a 3rd party tool. Dec 3, 2018 at 19:41

2 Answers 2

4

To launch a 64-bit executable from a 32-bit process, like launching wsl.exe from Tower, you need to use the sysnative filesystem redirector.

In this case, run: %windir%\sysnative\wsl.exe

You can test this by first launching a 32-bit version of Cmd by executing the following from the Run Dialog (Windows + R): %windir%\SysWoW64\cmd.exe

Then, inside the Cmd instance, you can execute the following:

%windir%\sysnative\wsl.exe

You should now see 64-bit WSL running attached to the same Console instance: enter image description here

1

It looks like this workaround does the trick:

command:    C:\WINDOWS\sysnative\WindowsPowerShell\v1.0\powershell.exe
parameters: wsl bash

It launches a 64-bit PowerShell instance to then load Windows Subsystem for Linux.

See also:

enter image description here


Alternative:

Another option I found is to use wsl-terminal, but since that depends on a 3rd party terminal and a whole bunch of other dependencies, it'd rather not use it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .