Closed voxelv closed 5 months ago
ncat
should work on Windows, so I'd recommend trying to determine what is causing the error. If you can install nc
/ netcat
(there appear to be Window builds available), then that might work since there is now an implementation using netcat
. You can test it with NB_BROWSE_SERVER_TOOL="netcat" nb browse -s
and then see if it loads in the browser. There's also now a socat
implementation that can be tested with NB_BROWSE_SERVER_TOOL="socat" nb browse -s
if socat
is available for Windows.
socat
is available through msys, and it works!
I was also trying out fish
shell, and was forgetting to use the -x
option to set environment variables. I went back and checked with gnu-netcat
and openbsd-netcat
with proper environment variables and they still didn't work. I didn't bother checking nmap
/ncat
, since I knew I tested with correct environment variables at that time.
Awesome. Good to hear. socat
on my machine still is erroring when attempting to serve static files, like images and Ace editor JavaScript files. Everything else should work fine. I'll keep refining this.
Neat!
I just noticed that w3m
is also showing just raw html when I nb browse
(without -g).
Also, it seems that nb browse -g
doesn't work (while nb browse -s
and navigating to the served address does work).
Edit: In the case of nb browse -g
, this is the output:
> nb b -g
Listening: http://localhost:6789
Then it immediately stops with error code 1
. firefox
(my setting for NB_GUI_BROWSER
) doesn't open.
I just pushed a commit that seems to resolve the raw HTML issue and also enables serving static files and images. If you can, please try and let me know if that works.
The GUI browser is opened using a helper that calls wslview
from wslu
. Does this require a different, non-WSL way to open the browser? Do any of the options in the following link work? https://stackoverflow.com/questions/3739327/launching-a-website-via-windows-commandline
nb browse
works in w3m
now! Thanks!
I'm not using WSL, I'm guessing that's why nb browse -g
isn't working.
explorer "https://google.com"
does work, but returns error code 1
.
rundll32 url.dll,FileProtocolHandler https://www.google.com
also works without an error code.
I'm guessing that these two go through the Windows Default Programs and might ignore NB_GUI_BROWSER
.
start firefox "https://www.google.com/"
works correctly, and would seem to be compatible with using NB_GUI_BROWSER
!
Awesome. I've updated it to use start "${NB_GUI_BROWSER}" "${url}"
when $NB_GUI_BROWSER
is assigned, and rundll32 url.dll,FileProtocolHandler "${url}"
otherwise. Please let me know if it works.
nb b -g
works great now!
@voxelv Awesome. Thank you so much for all the help!
Some debugging happened on #112. I opened this issue since that one was closed.
I'd really like to see if we can get it working on Windows, as
nb
has all the features I'd like (git-backed, markdown, quick notes from terminal, no proprietary web-sync subscription).