Conemu doesn't work with wsl since windows update
Asked Answered
B

5

34

Since I have updated windows, my conemu terminal is giving me the following error each time a session is created:

wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file

ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...

Has anyone an idea to bring conemu to a wsl terminal? Thank you

Bencion answered 11/11, 2019 at 0:19 Comment(1)
github.com/Maximus5/ConEmu/issues/1930Chaney
M
42

A similar error is caused by upgrading WSL from v1 to v2.

If you read through the discussion on this github issue for ConEmu you'll find a variety of instructions that can be distilled into:

Change the command for the task {Bash::bash} to the following:

wsl.exe
Mind answered 3/6, 2020 at 20:47 Comment(2)
Wow. That answer was to the point. The only uncertainty left is all the ConEmuBaseDirShort stuff in the original task.Mama
Have you tried running wsl without it? It is no longer necessary for myself. Read through the GitHub ref as there are many different user scenarios, including using -w for setting starting folder, --bash for loading a .bashrc file.Mind
W
17

A GitHub user posted this workaround which worked for me:

I've fixed the issue by doing this:

  1. Download latest cygwin1-20200531.dll.xz from https://cygwin.com/snapshots/ and unpack the file as cygwin1.dll into ConEmu\wsl\ (replacing the original file there)
  2. Download @Biswa96's wslbridge2 from https://github.com/Biswa96/wslbridge2/releases and unpack to the same directory
  3. Replacing {WSL::bash} task's Command with:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe -cur_console:pm:/mnt -eConEmuBuild -eConEmuPID -eConEmuServerPID -l

I can now access my Ubuntu under W10 just like before the W10 upgrade. Backscroll and arrows in VIM work as expected.

The key part of step 3 is to replace conemu-cyg-64.exe --wsl with conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe.

Longer term, it looks like the author of ConEmu is working on switching to the new Windows PTY API, which will eliminate the need for the wslbridge hack (and many others) entirely.

Wastebasket answered 16/6, 2020 at 2:22 Comment(1)
Looks like you don't need step 1 now -- there's a cygwin1.dll in the archive that comes down with step 2. Regardless, this work-around is still working, so thank you!Lovins
C
2

I had the same issue with last update windows

(Feature update to Windows 10, version 2004 - Successfully installed on ‎9/‎1/‎2020)

the error does not seem to be related to the version of WSL from 1 to 2:

   $ wsl -l -v
    
     NAME            STATE           VERSION
    
    Ubuntu-20.04    Running         1

Nevertheless, this workaround worked for me as well, thank you so much!

Ceporah answered 6/9, 2020 at 20:16 Comment(0)
A
1

Exactly this goes through upgrading WSL from v1 to v2.

You have to open cmder and in the startup command or Task enter {wsl.exe} and ready

cmder is working again.

Alvertaalves answered 20/8, 2020 at 20:49 Comment(0)
D
0

Yes, the new command for WSL2 is much simpler, but just running wsl does not cause .profile to be read because launching this way does not request login shell, and it launches as root.

A better command is to specify the user id and to invoke the shell of your choice (bash is most common) with the appropriate option. For bash a login shell is desirable so .profile, .bashrc and .bash_aliases get sourced, if present. The -l (lower case L) does that:

wsl -U yourUserName bash -l
Dennett answered 9/4, 2021 at 17:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.