d2
d2 copied to clipboard
xbrowser: Test $BROWSER
See https://discord.com/channels/1039184639652265985/1039184640285610147/1045448870064304218
Not sure if we're invoking $BROWSER correctly.
Thanks for a great piece of software. I think the problem is with the establishing of the socket for the port that garcon-url-handler listens to now. and because of that, the browser sends back whatever except 200/ok, and thats why openUrl is surmised to be guilty, since it is probably it that receives or faucets the error code.
I suspect the troubles are all on my side, due to iptables. which may prohibit the opening of a socket. Later.
ah interesting, in that case we should still detect it on our side if possible. do you know if other socket opening apps work for you? e.g. webpack, IDE debuggers, etc
Sorry for taking so long to reply. I think I have had some problem with my network stack. For some reason I have had to restart the networking service. As soon as I'm finished with what I'm currently doing, which may last well int Monday, I'll load the image and try again. I have a large work Image and the process is a bit timeconsuming, but you'll hear from me, and a fresh network stack.
fre. 25. nov. 2022, 6:53 p.m. skrev Alexander Wang @.***
:
ah interesting, in that case we should still detect it on our side if possible. do you know if other socket opening apps work for you? e.g. webpack, IDE debuggers, etc
— Reply to this email directly, view it on GitHub https://github.com/terrastruct/d2/issues/205#issuecomment-1327749866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOSITRFIRRLXJZ3EHMTVY3WKD4LLANCNFSM6AAAAAASK5P4SQ . You are receiving this because you commented.Message ID: @.***>
Hello. Other socket opening apps works for me, like telnet, and netcat at least now, after having assured my network stack are running as it should.
d2, however, needs to be started with a sudo, which I frankly don't like. Though, its a server app when starting in the watch mode, and one way or another, you'll need root privileges as I understand it to open a socket, so, there you go.
I don't know why you haven't pointed out that in your examples, but I recommend you do, because others like me, might not be so fluent with this, maybe you don't need to do that on your machine, but I'm pretty confident by now, that this is the way to go if the user is in a Debian at least container under crostini/ChromeOs.
All the tools I used to make sure I could make a port work had root rights, and Apache starts up as root, and the de-escalates.
So, my conclusion of this is that if I want to use watch, then I have to" sudo d2" to make it work, due to 'bind' of sockets. I think you should point that out as a fix, if it doesn't work. If you are getting into repos, then people will automatically use sudo when they download by aptitude or something else, and you can install it silently with root privileges. Then you can de-escalate rights once the socket is bound, having a server running with root privileges aren't ideal.
I learned a lot, so, thanks again, and best of luck!
ah interesting, in that case we should still detect it on our side if possible. do you know if other socket opening apps work for you? e.g. webpack, IDE debuggers, etc
Most stuff works that I can thinnk of, but none of the tools I otherwise use, except for php, uses the browser for rendering out of the box. and php works. So do, tcp-socket opening programs like telnet and netcat. and I'm sure I can use mkfifo in a shell script, but maybe I'll have to sudo the mkfifo call. I haven't much use for this nowadays, and I haven't tried. I'm confident that VSCode will work. I mostly use vim, so I set up a server for rendering aside, according to my needs.
I should point out that Chromeboxes and ChromeOs, are popular for development, so maybe you should try to install and use d2 in a fresh Debian 11 (Bullseye) Container.
will do for sure, thanks for bearing with the early iterations of D2 and rly appreciate the debug logs! @McUsr