From 85bf679d519624e429a03fc3607236dc5d251917 Mon Sep 17 00:00:00 2001 From: Joshua Dowell Date: Fri, 13 Mar 2026 10:35:41 -0500 Subject: [PATCH] fix: use BareBonesBrowserLaunch for Privacy Policy link on all platforms Desktop.getDesktop().browse() throws on some Linux platforms even when Desktop.isDesktopSupported() returns true, causing the Privacy Policy hyperlink in FirstLoginDialog to silently fail. Replace the Desktop if/else with a direct call to BareBonesBrowserLaunch.openURL() which works reliably cross-platform. Fixes #86. Issue: https://github.com/OpenIntegrationEngine/engine/issues/86 Signed-off-by: Joshua Dowell Signed-off-by: Tony Germano --- .../com/mirth/connect/client/ui/FirstLoginDialog.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/client/src/main/java/com/mirth/connect/client/ui/FirstLoginDialog.java b/client/src/main/java/com/mirth/connect/client/ui/FirstLoginDialog.java index 92172fceb..4bebfbc2e 100644 --- a/client/src/main/java/com/mirth/connect/client/ui/FirstLoginDialog.java +++ b/client/src/main/java/com/mirth/connect/client/ui/FirstLoginDialog.java @@ -12,7 +12,6 @@ import static com.mirth.connect.client.core.BrandingConstants.CENTRAL_USER_REGISTRATION; import static com.mirth.connect.client.core.BrandingConstants.MANDATORY_USER_REGISTRATION; -import java.awt.Desktop; import java.awt.Dimension; import java.awt.Point; import java.awt.event.WindowAdapter; @@ -188,13 +187,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { contentTextPane.setEditable(false); contentTextPane.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent evt) { - if (evt.getEventType() == EventType.ACTIVATED && Desktop.isDesktopSupported()) { + if (evt.getEventType() == EventType.ACTIVATED) { try { - if (Desktop.isDesktopSupported()) { - Desktop.getDesktop().browse(evt.getURL().toURI()); - } else { - BareBonesBrowserLaunch.openURL(evt.getURL().toString()); - } + BareBonesBrowserLaunch.openURL(evt.getURL().toString()); } catch (Exception e) { logger.error("Error opening hyperlink " + evt.getURL(), e); }