WSL / Windows Subsystem for Linux?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
mopsy
Posts: 3
Joined: Thu May 21, 2020 8:59 pm

WSL / Windows Subsystem for Linux?

Post by mopsy »

So, I've read that accessing WSL files through e.g.

Code: Select all

%userprofile%\AppData\Local\Packages\<linux package>\LocalState\rootfs\home\foo
is not a good idea, as it messes with files inside the subsystem in way it's not directly notified of. Easy enough, add that to Everything's exclude list in the "Exclude" section.

But on top of that, we're meant to browse these files through the built-in network share

Code: Select all

\\wsl$\<linux flavor>\home\foo
-- how do I add that such that Everything indexes it?

On an unrelated note: I seriously love Everything; thank you so much for developing it. ❤ I'm paying off some debt, but I intend to donate once I can.
therube
Posts: 4609
Joined: Thu Sep 03, 2009 6:48 pm

Re: WSL / Windows Subsystem for Linux?

Post by therube »

is not a good idea, as it messes with files inside the subsystem in way it's not directly notified of
Why?
(Not at all familiar with WSL) but it not "real", or does it rely on pseudo-linkages back to Windows?
(What a travesty that must be if that's the case. Take a real OS & kludge it into a kludge.)

Anyhow, while Everything can be used for darn near Everything, for the file searching part, can't see how that would negatively affect - anything?


Is \\wsl$\ "real"? As in can you add that as a Folder Index in Everything?
mopsy
Posts: 3
Joined: Thu May 21, 2020 8:59 pm

Re: WSL / Windows Subsystem for Linux?

Post by mopsy »

therube wrote: Fri May 22, 2020 2:40 am
is not a good idea, as it messes with files inside the subsystem in way it's not directly notified of
Why?
(Not at all familiar with WSL) but it not "real", or does it rely on pseudo-linkages back to Windows?
(What a travesty that must be if that's the case. Take a real OS & kludge it into a kludge.)

Anyhow, while Everything can be used for darn near Everything, for the file searching part, can't see how that would negatively affect - anything?


Is \\wsl$\ "real"? As in can you add that as a Folder Index in Everything?
Well, I'm not an expert on the exact anatomy of this process, but I believe WSL runs on Hyper-V somehow, but perhaps not directly -- I know it requires Hyper-V to be enabled to be installed. WSL2 is supposed to be a full-on Linux kernel with managed virtualization, but that doesn't come out to full release until the 28th of this month. Anyhow, you can enable WSL and install a Linux flavor from the Microsoft store.

As I understand it, it has a virtualized environment where files live inside from the linux end like you'd expect

Code: Select all

/home/user/<files>
, but actually exist in the above-mentioned AppData directory. I believe this is just how the virtualization is being done, rather than using, a managed volume file (though I think WSL2 will do that). So editing the files from the Windows side is done "outside" of the WSL linux, so it can cause issues in some situations, again, so I'm to understand.

The preferred, supposedly "correct" way to access the files is through the network share hosted from WSL's linux side that it is aware of this. But I don't know how to add it. Folders gives me a tree instead of an input, and if I look into Network, I can't see it, but I don't see \\wsl$\ in my Network window normally. I just know it's there, and I pinned it to my quick access.

I was just wondering if there was an established way to index files from it -- even if that required installing something inside the linux. Currently, I am searching the file, finding the Windows AppData one, then going into the network share and following the directory string to get to the file I want, then sending that file to the application I want. This is obviously not ideal, haha. I don't think searching this way affects anything, it's just super inconvenient. I wanted to have Everything find files how we're meant to.

If you give me a test to establish if \\wsl$\ is real or not, I can certainly perform it, but I'm not sure how else to check. Hopefully I've given enough helpful information anyhow.
NotNull
Posts: 5258
Joined: Wed May 24, 2017 9:22 pm

Re: WSL / Windows Subsystem for Linux?

Post by NotNull »

I have only experience with WSL1 , but I guess this should work (and please let us know if it does, as that might help other people like you):
  • In Everything, go to Menu:Tools > Options > Indexes > Folders
  • Click the Add button
  • In the Folder: box, enter
    \\wsl$\<linux flavor>\home\foo
  • Press the OK button
  • Press the OK button
  • Give Everything some time to index the content of this folder (see scanning indication in the status bar)
  • In Everything's search bar, search for
    \\
    and see if you get any results.

EDIT:

Almost forgot:
- Enable Everything Service
- Disable Run as administrator
Both can be found under Menu:Tools > Options > General
mopsy
Posts: 3
Joined: Thu May 21, 2020 8:59 pm

Re: WSL / Windows Subsystem for Linux?

Post by mopsy »

NotNull wrote: Sun May 24, 2020 7:48 pm I have only experience with WSL1 , but I guess this should work (and please let us know if it does, as that might help other people like you):
  • In Everything, go to Menu:Tools > Options > Indexes > Folders
  • Click the Add button
  • In the Folder: box, enter
    \\wsl$\<linux flavor>\home\foo
  • Press the OK button
  • Press the OK button
  • Give Everything some time to index the content of this folder (see scanning indication in the status bar)
  • In Everything's search bar, search for
    \\
    and see if you get any results.

EDIT:

Almost forgot:
- Enable Everything Service
- Disable Run as administrator
Both can be found under Menu:Tools > Options > General
Hey, apologies for the late reply; I got bogged down with work (and the everything happening in the news) and forgot to check back here.

That worked! I was already running the Everything Service, and not running Everything as administrator. I didn't realize you could just type arbitrary paths in that box next to "Folder:" -- I thought you were stuck adhering to the tree navigation, which I couldn't get wsl$ to appear in. Thanks a lot!

I'm still on WSL1, though I intend to upgrade it to WSL2 very soon, when I have the time to take the Windows 2004 / 2020 H1 update. I'll try to report back and let you folks know if that method still works then. Thanks again for taking the time!
Post Reply