Skip to content

[BUG] Clicking Privacy Policy Link on First Login dialog does not work on some platforms #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tonygermano opened this issue May 14, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@tonygermano
Copy link
Member

The problem is here:

contentTextPane.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent evt) {
if (evt.getEventType() == EventType.ACTIVATED && Desktop.isDesktopSupported()) {
try {
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(evt.getURL().toURI());
} else {
BareBonesBrowserLaunch.openURL(evt.getURL().toString());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
});

On some Linux platforms (I think those not running a Gnome desktop) Desktop.isDesktopSupported() returns true, however, Desktop.getDesktop().browse() is not a supported action, throwing an exception.

Recent updates to BareBonesBrowserLaunch already try to use Desktop.browse() if it is available, so it would be better to simplify this section of code to not check isDesktopSupported and only call BareBonesBrowserLaunch.openURL(evt.getURL().toString()); in the try block.

@tonygermano tonygermano added bug Something isn't working good first issue Good for newcomers labels May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant