diff --git a/lib/desktop/os.ex b/lib/desktop/os.ex index c5739a8..88ee44d 100644 --- a/lib/desktop/os.ex +++ b/lib/desktop/os.ex @@ -145,9 +145,15 @@ defmodule Desktop.OS do def launch_default_browser(file) do spawn(fn -> case type() do - MacOS -> System.cmd("open", [file], stderr_to_stdout: true, parallelism: true) - Linux -> System.cmd("xdg-open", [file], stderr_to_stdout: true, parallelism: true) - _other -> :wx_misc.launchDefaultBrowser(file) + MacOS -> + System.cmd("open", [file], stderr_to_stdout: true, parallelism: true) + + Linux -> + System.cmd("xdg-open", [file], stderr_to_stdout: true, parallelism: true) + + _other -> + Desktop.Env.wx_use_env() + :wx_misc.launchDefaultBrowser(file) end end) end