Closed johnnychen94 closed 2 years ago
For me:
$ cat /proc/version
Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020
From some searching, it seems occursin("microsoft", lowercase(read("/proc/version", String)))
may be the most robust test.
It turns out there's a package for this: https://github.com/tpapp/DefaultApplication.jl
It doesn't support WSL, but you could make a PR for WSL support there, and Bokeh can just use DefaultApplication.open
to open plots by default, unless the user explicitly sets a browser_cmd
.
I decided to use DefaultApplication which simplifies things a bit: https://github.com/cjdoris/Bokeh.jl/blob/426bb87fef1a8bae5ba49d70b020b799f3307c46/src/display.jl#L13-L19
I've kept a branch in the logic to handle WSL explicitly and made a PR to DefaultApplication to add WSL support: https://github.com/tpapp/DefaultApplication.jl/pull/17.
Closing as I think everything relevant is on main now.
Thanks!
This works locally on Windows11 WSL