I am trying to open http://localhost in (any) browser from WSL bash terminal.
So far I have tried:
- How can I open Google Chrome from the terminal with the URL "localhost:3000"?
- "Couldn't find a file descriptor referring to the console" on Ubuntu bash on Windows
- How to mention C:\Program Files in batchfile
No luck in setting up BROWSER variable for xdg-open, it responds to xdg-open http://localhost
with /usr/bin/xdg-open: 851: /usr/bin/xdg-open: /c/"Program: not found
.
I have tried escaping with \
and ^
. Using %ProgramFiles(x86)%
and ofcorse "Program Files (x86)"
. More or less it is the same answer every time... Any ideas how to set a work flow for opening browser in WSL?
So far I've ended up with:
/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe localhost
But I am looking for more elegant solution.