ConEmu build: 191012 [64]
OS version: Windows 10.0.19013.1122 x64
Used shell version: WSL (bash, ubuntu)
I've upgraded Windows Insider build today. Since the upgrade, ConEmu WSL task no longer works. It exits with the following error:
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...
This is my {WSL:Bash} task command line:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt
Please note that WSL works ok when started as "Ubuntu" in Start Menu, and it works fine with the new Windows Terminal. The only software that has the issue is ConEmu at the moment.
Also, other console types (Git Bash, Windows CMD, Powereshell) all work fine. The only combination that doesn't work is ConEmu with WSL.
I also tried moving the ConEmu.xml to a different location and starting fresh -- to exact same results.
I just ended up bypassing the WSL bridge. Tested on WSL 1 & 2.
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d ubuntu -u lester -cur_console:t:"Ubuntu" -- boot.sh
The boot.sh I run is of course optional, and could be removed or replaced with some other command you want to run. I've just used one for a long time with ConEmu to instantiate ANSI support so my powerline and boot splash look puuuurdy (some of it is prob superfluous).
#!/bin/bash
cat /mnt/d/some/long/path/conemu-maximus5/ConEmu/boot.ans
cd ~
screenfetch
bash -l -i
Thank you. This does indeed work. You don't need to specify the user (the default one, that corresponds to the Windows user, will be used), but you do need to specify the distro (at least in my case, otherwise it doesn't work and exits with "working less than 10 seconds" error).
So, essentially, as little as:
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d ubuntu
is enough.
Can confirm that the username isn't needed. I think I assumed it was necessary due to me creating a different username for WSL than my Windows account. I suppose it's only necessary if you have multiple user accounts in your WSL distro. The additional -cur_console:t:"Ubuntu" is simply to name the tab. I then set the tab icon with /icon "%USERPROFILE%\AppData\Local\lxss\bash.ico" in the 'Task parameters' field.
Now I just need to figure out how to get rid of the annoying extra entry in the 'Create New Console' dialogue. Been having that issue for years now and have just lived with it :goberserk: .

You probably haven't named the task so it shows up like that. You can edit all your tasks by opening Settings and going to Startup -> Tasks (yes, it doesn't make too much sense for it to be under Startup, which is probably something for another minor issue report).
You can name that task however you want, (the topmost, unlabeled input box) and you can delete any task by selecting it in the list on the left and clicking on the minus (i.e. -) key below the list.
@bmarkovic The highlighted text there is actually the contents of the bash::WSL task right below it. Guess I should have specified that. All of my tasks are always named/categorized. Would love any other ideas, otherwise it may be time to submit my own issue for it. Cheers.
I just ended up bypassing the WSL bridge. Tested on WSL 1 & 2.
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d ubuntu -u lester -cur_console:t:"Ubuntu" -- boot.shThe
boot.shI run is of course optional, and could be removed or replaced with some other command you want to run. I've just used one for a long time with ConEmu to instantiate ANSI support so my powerline and boot splash look puuuurdy (some of it is prob superfluous).#!/bin/bash cat /mnt/d/some/long/path/conemu-maximus5/ConEmu/boot.ans cd ~ screenfetch bash -l -i
Lester where do you place bash.sh in order for it to be found when opening a new window? I'd like to do something similar and have tried in in several location but keep getting the error "/bin/bash: bash.sh: command not found"
Thanks!
Can't currently look up my setup but I believe it's in the vendor\console\ConEmu directory. You could also try using a fully qualified path (e.g. /mnt/c/someDir/script.sh).
Admittedly, I've had issues finding out which boot.sh was actually being used, as I had one in many directories to troubleshoot your problem.
The code in @bmarkovic worked for for me with a minor adjustment:
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d ubuntu
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d <wsl_Image_Name>
For my install of Ubuntu 20.04, it worked with this:
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d Ubuntu-20.04
You can get the Linux image name with the following:
wsl --list
@evoelker thanks, ubuntu doesn't work, Ubuntu with version works.
I've given up and moved to Windows Terminal, everything works out of the box for my particular setup
Most helpful comment
Thank you. This does indeed work. You don't need to specify the user (the default one, that corresponds to the Windows user, will be used), but you do need to specify the distro (at least in my case, otherwise it doesn't work and exits with "working less than 10 seconds" error).
So, essentially, as little as:
is enough.