提交 f2a66bbf authored 作者: Florian Léger's avatar Florian Léger

Server: use xdg-open to open the WebConsole in the user's preferred browser on Linux

上级 440e5139
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论