Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Mode auto recognize error #1291

Open
imReker opened this issue Oct 20, 2017 · 5 comments
Open

Terminal Mode auto recognize error #1291

imReker opened this issue Oct 20, 2017 · 5 comments

Comments

@imReker
Copy link

@imReker imReker commented Oct 20, 2017

Windows 10 16299.19
ConEmu 161206

  1. Start CMD Task in ConEmu
  2. Run bash.exe -> Terminal Mode = X Bug
  3. Exit bash, return to CMD
  4. Run WSL.exe (or Ubuntu.exe, if WSL has been installed from WinStore) -> Termin Mode = W Bug
  5. Exit bash, return to CMD
  6. Start Bash Task in ConEmu -> Termin Mode = XA (XTerm+AppKeys) OK
  7. Keep Bash Task, and return to CMD tab, run bash.exe -> Terminal Mode = W->X->W in a flash Bug
  8. Exit bash opened in step 7, keep Bash Task in step 6
  9. Run bash.exe with Win+R -> Terminal Mode = W->X Bug

Seems that ConEmu hardcoded 'bash.exe' to recognize WSL, so the Terminal Mode of WSL.exe or Ubuntu.exe is incorrect.

Bonus, run ubuntu.exe outside of ConEmu (or click Ubuntu Tile in Start Menu), the Terminal Window won't be catched in ConEmu (tried add ubuntu.exe in Default term Settings)

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 20, 2017

@imReker
Copy link
Author

@imReker imReker commented Oct 20, 2017

If you mean the lastest stable version is 'Old Builds', okay,
Let's repro in 170910 alpha.

  1. Start CMD Task in ConEmu
  2. Run bash.exe -> Terminal Mode = XA OK
  3. Exit bash, return to CMD
  4. Run WSL.exe (or Ubuntu.exe, if WSL has been installed from WinStore) -> Termin Mode = W Bug

Run cmd.exe in bash.exe in cmd.exe, press any function key (backspace or arrow), booooooooom XD
Switch Terminal Mode from XAC to W, press any function key, nothing happend XD

Good news, this bug will be fixed in next Insider Preview.


And,
Win+R:
bash.exe -> catched
wsl.exe -> catched
Ubuntu.exe -> not catched (Think not possible to fix)


One more thing:
If WSL is not installed by legacy way but from Windows Store, the Ubuntu icon is located in
"C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\images\icon.ico"
Different distros in different path.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 20, 2017

I do not have brother wsl.exe nor ubuntu.exe on my Win10 PC. Only bash.exe is installed.

When any application set ENABLE_VIRTUAL_TERMINAL_INPUT ConEmu switches to XA automatically.

When you use connector, ConEmu is working on POSIX terminal mode and any console application utilizing WinAPI will fail for obvious reason. Same as in mintty.

I'm not on insider ring, because I don't want to harm my working PC.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 20, 2017

Stable is old build because it does not support newer features of Windows 10. It was released before

@imReker
Copy link
Author

@imReker imReker commented Oct 23, 2017

No insider ring needed, just goto Windows Update and upgrade to Windows 16299, then you will get bash.exe and wsl.exe in system32.
Install Ubuntu from Windows Store and you will get ubuntu.exe.
Run wslconfig.exe to switch Legacy or Store wsl distro which bash.exe would run.
The legacy wsl (bash.exe) will be removed in future.
See https://blogs.msdn.microsoft.com/commandline/2017/07/10/ubuntu-now-available-from-the-windows-store/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.