Skip to content

Commit 80ae165

Browse files
Fix ViaProxyWindow#openURL not working on Linux systems (#535)
1 parent caf1a9e commit 80ae165

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/net/raphimc/viaproxy/ui/ViaProxyWindow.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ private void initTabs() {
124124

125125
public static void openURL(final String url) {
126126
try {
127-
Desktop.getDesktop().browse(new URI(url));
127+
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
128+
Desktop.getDesktop().browse(new URI(url));
129+
} else {
130+
new ProcessBuilder("xdg-open", url).start();
131+
}
128132
} catch (Throwable t) {
129133
showInfo(I18n.get("generic.could_not_open_url", url));
130134
}

0 commit comments

Comments
 (0)