提交 4e59f570 authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #357 from Enovea/master

Server: use xdg-open to open the WebConsole in the user's preferred browser on Linux
...@@ -670,9 +670,9 @@ public class Server extends Tool implements Runnable, ShutdownHandler { ...@@ -670,9 +670,9 @@ public class Server extends Tool implements Runnable, ShutdownHandler {
// Mac OS: to open a page with Safari, use "open -a Safari" // Mac OS: to open a page with Safari, use "open -a Safari"
Runtime.getRuntime().exec(new String[] { "open", url }); Runtime.getRuntime().exec(new String[] { "open", url });
} else { } else {
String[] browsers = { "chromium", "google-chrome", "firefox", String[] browsers = { "xdg-open", "chromium", "google-chrome",
"mozilla-firefox", "mozilla", "konqueror", "netscape", "firefox", "mozilla-firefox", "mozilla", "konqueror",
"opera", "midori" }; "netscape", "opera", "midori" };
boolean ok = false; boolean ok = false;
for (String b : browsers) { for (String b : browsers) {
try { try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论