Linux: command to open URL in default browser

后端 未结 10 1886
青春惊慌失措
青春惊慌失措 2020-12-07 17:47

What command we have to execute (from Java, but that should not matter) on Linux (different common distributions) to open a given URL in the default browser?

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-07 17:56

    I think a combination of xdg-open as described by shellholic and - if it fails - the solution to finding a browser using the which command as described here is probably the best solution.

提交回复
热议问题