microsoft / microsoft/WSL

"Open in Windows Terminal" doesn't work correctly when WSL directories are mounted into Windows

Open
#7,726 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

Version

10.0.19043.1348

WSL Version
  • WSL 2
  • WSL 1
Kernel Version

5.10.60.1

Distro Version

Ubuntu 20.04

Other Software

Windows Terminal 1.11.2921.0

Repro Steps
  1. Have Ubuntu 20.04 installed as WSL and \wsl$ mounted as a "Network disk".
  2. In Windows Explorer go to some folder in WSL mounted disk (e. g. Z:\home\rajsky\ali).
  3. Click with right mouse button to open context menu and select "Open in Windows Terminal" (my default one is Ubuntu)
Expected Behavior

Windows terminal should open at the exact folder.

Actual Behavior

Windows Terminal opens in /home directory instead. This only occures in the mounted Ubuntu disk (e.g. if I would open any folder on my C: disk, it would work correctly).
image

Diagnostic Logs

[Fri Nov 19 07:27:05 2021] init: (21) ERROR: CreateProcessParseCommon:849: Failed to translate Z:\home\val\bin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. First reproduce the issue using a WSL 2 Ubuntu 20.04 directory mounted as a Windows network disk, then inspect the handling of the Explorer "Open in Windows Terminal" action and the CreateProcessParseCommon diagnostic. Done means Windows Terminal opens in the exact mounted WSL folder rather than /home.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.