自 Windows 更新以来,Conemu 不适用于 wsl

Mar*_*n J 34 conemu cmder

由于我更新了窗口,因此每次创建会话时,我的 conemu 终端都会给我以下错误:

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...
Run Code Online (Sandbox Code Playgroud)

有没有人想把 conmu 带到 wsl 终端?谢谢

Sco*_*NET 41

将 WSL 从 v1 升级到 v2 会导致类似的错误。

如果您通读ConEmu上关于这个github 问题的讨论,您会发现可以提炼成的各种说明:

将任务 {Bash::bash} 的命令更改为以下内容:

wsl.exe
Run Code Online (Sandbox Code Playgroud)


jos*_*736 17

一个GitHub 用户发布了这个对我有用的解决方法

我通过这样做解决了这个问题:

  1. cygwin1-20200531.dll.xzhttps://cygwin.com/snapshots/下载最新版本并将文件解压缩cygwin1.dllConEmu\wsl\(替换那里的原始文件)
  2. wslbridge2https://github.com/Biswa96/wslbridge2/releases下载@Biswa96's并解压到同一目录
  3. {WSL::bash}任务的命令替换为:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe -cur_console:pm:/mnt -eConEmuBuild -eConEmuPID -eConEmuServerPID -l
Run Code Online (Sandbox Code Playgroud)

我现在可以像在 W10 升级之前一样在 W10 下访问我的 Ubuntu。VIM 中的反向滚动和箭头按预期工作。

第 3 步的关键部分是替换conemu-cyg-64.exe --wslconemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe

从长远来看,看起来 ConEmu 的作者正在努力切换到新的Windows PTY API,这将完全消除对 wslbridge hack(以及许多其他黑客)的需要。