Closed btwiuse closed 1 year ago
I just fixed this 3 days ago (474f93b75ca3ea6a3c50fe7c9dbe293fd0a18d40). I plan on releasing a new version very soon.
But the current solution is relying on the presence of wslview
, which is unavailable on non-ubuntu distros. (I use arch btw)
It's available for installation on other distros including Arch (which is also my WSL distro), but it's not preinstalled. I did just find out it's no longer preinstalled on Ubuntu as of 22.04. If wslview
is missing, there is fallback to xdg-open
, though that might not do the "right" thing.
I just released v0.6.0 which includes the fix. I opened #21 for the issue of requiring either wslview
or xdg-open
to be available on WSL.
I use
open_browser
to open thehttp://127.0.0.1:33541
in WSL2 withBROWSER="/mnt/c/Program Files/Firefox Nightly/firefox.exe"
The browser opens
file://///wsl.localhost/Arch/home/aaron/gear/http/127.0.0.133541
instead ofhttp://127.0.0.1:33541
.Such behavior is caused by wslpath:
Can we check if the opened path is a url first before passing it to
wslpath
?