cpbotha / xdg-open-wsl

xdg-open replacement for WSL that opens files and links using Windows apps.
BSD 3-Clause "New" or "Revised" License
162 stars 12 forks source link

Doesn't play nicely with sshfs #2

Closed rossjrw closed 4 years ago

rossjrw commented 4 years ago

I'm using WSL2 to manage files on a remote system. Three cheers for quarantine!

I'm generating images and need to be able to see them. For that, I'm using https://github.com/libfuse/sshfs to mount the remote filesystem into a directory, and then xdg-open the images from there. Theoretically, it's clean and easy, and once I've unmounted the remote filesystem you wouldn't know they were ever there.

Problem: when explorer.exe encounters a file address pointing to a mount, it doesn't seem to like that very much, and ignores it, opting instead to just open as if I'd clicked it on the taskbar. Moving the image to a local directory and opening it from there works fine, though that sort of defeats the point of using xdg-open and sshfs in the first place.

I know it's sort of out of scope, and I'm not sure there's even anything that can be done to fix this issue, but I thought it was worth mentioning. Thanks for the tool!

rossjrw commented 4 years ago

Trust me to make an issue ten minutes too early: looks like this is (was) a known problem for explorer.exe per https://github.com/microsoft/WSL/issues/4172, and just need the following sshfs option: -o allow_other (https://github.com/microsoft/WSL/issues/4172#issuecomment-558123982)

So long as allow_other is set, explorer.exe can access the mount no problem.