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

Linux not appearing in file explorer; cannot use wslview #11252

Closed
1 of 2 tasks
michaelfromyeg opened this issue Mar 4, 2024 · 21 comments
Closed
1 of 2 tasks

Linux not appearing in file explorer; cannot use wslview #11252

michaelfromyeg opened this issue Mar 4, 2024 · 21 comments

Comments

@michaelfromyeg
Copy link

Windows Version

Microsoft Windows [Version 10.0.26063.1]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-microsoft-standard-WSL2

Distro Version

Ubuntu 20.04

Other Software

wslu v4.1.1-1

Repro Steps

Running wslview <filename> I get,

Start : This command cannot be run due to the error: Element not found.
At line:1 char:128
+ ... oding(437); Start "\\wsl.localhost\Ubuntu\home\mdema\school\cpsc416\c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

(I believe this is related), also, in file explorer, Linux doesn't appear in the left side bar and I cannot normally access files. I previously had some folders within WSL pinned to quick access; when I click them, I get Element not found.

For the second problem, I have a found a workaround. If I directly put \\wsl.localhost in the address bar, it takes me to the WSL root (with the Ubuntu folder accessible as expected).

Expected Behavior

wslview should open the file.

Linux should be visible in file explorer. Quick links should take me to the specified directory under WSL.

Actual Behavior

wslview reports, for all files

Start : This command cannot be run due to the error: Element not found.
At line:1 char:128
+ ... oding(437); Start "\\wsl.localhost\Ubuntu\home\mdema\school\cpsc416\c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Linux item is missing from file explorer.

Diagnostic Logs

No response

Copy link

github-actions bot commented Mar 4, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@michaelfromyeg
Copy link
Author

I did a log capture while running wslview; hopefully it's helpful!

WslLogs-2024-03-04_14-52-57.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 5, 2024

Thank you @michaelfromyeg. Can you share the output of dir \\wsl.localhost\<distro>\path\to\file ?

@michaelfromyeg
Copy link
Author

michaelfromyeg commented Mar 5, 2024

Here it is! (ran from cmd, I assume that's what you meant)

C:\Users\mdema>dir \\wsl.localhost\Ubuntu\home\mdema\raft_diagram.pdf
 Volume in drive \\wsl.localhost\Ubuntu has no label.

 Directory of \\wsl.localhost\Ubuntu\home\mdema

03/05/2024  02:27 PM            47,827 raft_diagram.pdf
               1 File(s)         47,827 bytes
               0 Dir(s)  73,144,909,824 bytes free

edit: and to confirm

└ $ wslview ~/raft_diagram.pdf
Start : This command cannot be run due to the error: Element not found.
At line:1 char:128
+ ... oding(437); Start "\\wsl.localhost\Ubuntu\home\mdema\raft_diagram.pdf ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

@Physikbuddha
Copy link

Physikbuddha commented Mar 6, 2024

I can confirm. Looks like Windows tried to install a WSL update today, and now my pinned folders from WSL in the file explorer are gone, as well as the Linux shortcut. Accessing via \\wsl.localhost or \\wsl$ still works, but pinning new folders to the quick access are not clickable.

Found one related entry in the event viewer:
Installation Failure: Windows failed to install the following update with error 0x80073D02: 9P9TQF7MRM4R-MicrosoftCorporationII.WindowsSubsystemforLinux

Also getting a lot of warnings from RestartManager, one each for C:\Windows\System32\vmwp.exe, C:\Windows\System32\dllhost.exe, C:\Program Files\WSL\wslhost.exe, C:\Program Files\WSL\wslrelay.exe, C:\Program Files\WSL\msrdc.exe:
Application 'C:\Program Files\WSL\wslrelay.exe' (pid 18420) cannot be restarted - Application SID does not match Conductor SID.

Doing a system restore brought WSL back for a short period, now it's gone again.

EDIT: Slight difference between my end and OP's: wslview still works for me (but I am not using it actively). Quick access items completely disappeared on my end instead of giving an Element not found error.

@kmnis
Copy link

kmnis commented Mar 6, 2024

I can confirm the same issue. I installed the latest windows 11 update (KB5034848) and now Linux icon is gone. When I try to open via \\wsl.localhost and try to pin the folder on left, nothing happens. All my previous pins related to WSL have also been disappeared.

@Ramzy1990
Copy link

Can confirm the same behavior as well: (no icon, previous quick access pins deleted, not able to make new pins)
Able to use \wsl$ from the explorer bar.
wsl --version output:

WSL version: 2.1.4.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3155

@Korred
Copy link

Korred commented Mar 6, 2024

I'm experiencing the same issue - the Linux icon has vanished. I'm using the same WSL version as @Ramzy1990, and I'm encountering the same error log as @Physikbuddha:

error 0x80073D02: 9P9TQF7MRM4R-MicrosoftCorporationII.WindowsSubsystemforLinux

This issue surfaced today, and it seems unrelated to the most recent Windows Update KB5034848, since mine disappeared while being on KB5034467.

@wgetnz
Copy link

wgetnz commented Mar 7, 2024

I have the same problem, when I update using wsl --update --pre-release, the problem occurs

@mannkeithc
Copy link

I received the WSL Update via the Microsoft Store today, 7 Mar 2023, and I also now have the problem where the Linux Folder vanished from Explorer's left-hand folder / drives pane post update. I previously reported this issue when I tried the preview of this WSL update and rolled it back as consequence. Unfortunately, that was ignored. I am currently using the workaround, + and enter \wsl$\ and then pin to Explorer's quick access.

@Korred
Copy link

Korred commented Mar 12, 2024

Looks like there was an update today Windows Subsystem for Linux. Product version: 2.1.5.0 and the icon is back 👍

image

@michaelfromyeg
Copy link
Author

Can confirm this update fixes my issue at least. For those wondering, run

$ wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 2.1.5.

2.1.5 fixed both the File Explorer issue and wslview so I'm happy, but I'll leave the issue open since there are other related things going on.

@kmnis
Copy link

kmnis commented Mar 14, 2024

I upgraded to the new version but issue still not fixed. I don't see Linux in File Explorer left Menu and can't pin any folders to quick access as well.

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 22, 2024

Fixed in 2.2.1

@Premshay
Copy link

Can confirm that the update pre release solved it for me as well. Thank you for the tip.

@MGB-Hadean
Copy link

Getting this after 24H2 win11 update: all wsl quick access links were gone after the update.
Updated wsl to 2.3.24.0, after which I created a new quick access link to wsl: this worked fine when tested immediately.
Tried to access it after ~10 mins (new explorer window) get the error message: "Element not found".
Also noted: quick access menu now very flaky. RMB shows different menus or doesn't change to selected item. Slow to draw and flickers to different items on draw.

Edition Windows 11 Pro
Version 24H2
OS build 26100.1742
Experience Windows Feature Experience Pack 1000.26100.18.0

wsl --version
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.1742

@conan
Copy link

conan commented Oct 16, 2024

Same as @MGB-Hadean above, all my quick access pins disappeared. I can add them back, but they either give me "Element not found" as above, or do nothing in a dialogue.

>wsl --version
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2033

Image

I opened a new issue for this given this one is closed: #12173

@MGB-Hadean
Copy link

Weirdly, the quick access links have started working fine for me now...

@freedxmgxd
Copy link

Still brokes to me, and wslview not found

@kiraware
Copy link

kiraware commented Nov 22, 2024

Me too here. I already follow the instruction on this post https://answers.microsoft.com/en-us/windows/forum/all/why-there-is-linux-in-my-file-explorer-bar/c7aaca2b-7e7d-4cd2-bb80-6a4cde330433?page=1, but IT DON'T WORK. It suggest to create a new file named linux.reg and paste this content to that file

Windows Registry Editor Version 5.00 
 
[HKEY_CURRENT_USER\Software\Classes\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}] 
@="Linux" 
"System.IsPinnedToNameSpaceTree"=dword:00000001

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}]
@="Linux"

@jaysqvl
Copy link

jaysqvl commented Dec 12, 2024

If you navigate to

\\wsl$

then right click on the Ubuntu folder and map network drive. You can then start pinning folders from within it again. You can also view it under "This PC". Hope this helps anyone else.

Windows 11 Pro
24H2
WSL Version: 2.4.5 (Pre-release)

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

No branches or pull requests