Allow WSL extension to use default windows terminal/console to launch and install distributions #3742
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the pull request
This PR fixes an issue where the wsl extension was launching into the release version of the Windows terminal app and not honoring the default terminal app set by the user.
This fixes an issue where the Windows terminal app may not exist or is a stub app.
Changes:
Use wsl.exe directly instead of attempting to launch
wt.exe
with the distributions terminal profile. E.g attempting to launch the ubuntu distribution with its shipped profile. Spoke to Mike from the terminal team, to confirm that we shouldn't need to usewt.exe
directly and that terminal should be able to figure it out on its own. Terminal ships with a profile for ubuntu itself. However, there is an issue where ubuntu isn't launched with its profile even when terminal is the default when launching thewsl.exe
directly. The issue should be resolved once this issue is figured out in the terminal repo WSL profile matching fails to work if launched from start menu terminal#12582, but for now we should stick with just callingwsl.exe
directly rather than throughwt.exe
.Video of me going from a state where my computer doesn't have terminal installed and launching a WSL distribution, to installing both Terminal release and Terminal Preview. The video shows that after changing my default terminal host, Dev Home is able to launch the WSL distribution using the correct terminal version.
Video.showing.WSL.distirbution.launching.into.the.users.default.terminal.mp4
References and relevant issues
Detailed description of the pull request / Additional comments
Validation steps performed
PR checklist