Closed OldDragon2A closed 4 months ago
nb
doesn't appear to reference $DISPLAY
directly. It seems like $DISPLAY
is generally used by something accessing the GUI, but nb browse --serve
shouldn't use the GUI, so I don't know what's triggering it. You can try setting it to a standard value like DISPLAY=:0
(more info: [1], [2]).
In case it helps, there's also an undocumented nb browse --daemon
option, which is like --serve
, but requires <CTRL-C>
to exit.
Weird, I thought it might have been trying to open the browser automatically and that was what was causing it. Tried it with daemon and get the same result.
$ nb browse --daemon
Listening: http://localhost:6789
Error: no DISPLAY environment variable specified
I tried setting DISPLAY but that just changes it to an error about the display. Error: cannot open display: :0
Not sure what could be causing it to try if that isn't part of the program. Tried it with bash --noprofile --norc
in case of a conflict but that didn't change anything. As far as I can tell, all of the other commands still work as expected.
What's the OS? I just tried in Ubuntu and Arch virtual machines with blank $DISPLAY
values and wasn't able to reproduce the error.
It is running Arch Linux.
Tried it with X and it does open up the browser when I run nb browse
or nb browse --serve
. Must be something on my system but I'm drawing a blank on what it could be. Slowly looking through a strace now to see if anything jumps out at me.
Found the main problem. I have BROWSER set and it will always open the browser if that is set. It works normally if I clear that before hand.
Awesome. Thanks for the info! This should be fixed in the latest version in the repo.
Grabbed a copy and it looks good. Thank you for the quick turn around!
Was planning to use port forwarding to get at the local site but I can't find an option to start a headless server.
nb browse
andnb browse --serve
both give anError: no DISPLAY environment variable specified
. Am I missing something?