Closed kdheepak closed 1 year ago
This looks like a not so good solution. xdg-open
opens a file or URL in the user's preferred application. The list ["/usr/bin/firefox", "/usr/bin/google-chrome"]
does not. Furthermore, binary paths are not very standardized across distributions in Linux. For example, firefox
is located at /home/<user>/.nix-profile/bin/
at my system. If fallbacks for xdg-open
would be implemented, then it would make more sense to check whether a program exists via which <program>
than to hardcode full paths. For what it's worth, Pluto also uses xdg-open
and I don't see any issues about it there.
Maybe then a warning if xdg-open
is not installed? I don't daily drive a Linux machine, and my past experiences have been just ssh-ing into a cluster, so I'm not familiar with any GUI related Linux features.
For linux, in this package there's this line:
https://github.com/tlienart/LiveServer.jl/blob/36a7b208d5fc256283cfc484029a268ff2a5d4a6/src/server.jl#L23-L26
On StackOverflow, a user commented with this:
Desktop.jl
does this instead:Specifically for Linux, it checks for other browsers too:
What are your thoughts about adding something similar into this package?