How a snap can use the default system browser to open a URL?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Won't Fix
|
Low
|
Unassigned |
Bug Description
I have a snap with a JavaFX application, which should be able to use the system's browser to show some URL.
However, it seems that no browser can be found in the environment by the snap. The following error occurs:
>> java.lang.
at com.sun.
at javafx.
at org.rustkeylock
at ...
...more stacktrace messages...
I tried including the browser-support plug in the snapcraft.yaml with no luck.
How can the system browser be called? Is there some interface that I can use?
You can find the snapcraft yaml here: https:/
I use base18 and openjdk 11.
affects: | snapcraft → snapd |
You should use `xdg-open <url>` to open the browser. Looking at the implementation here: http:// hg.openjdk. java.net/ openjfx/ jfx-dev/ rt/file/ 981cff5755bc/ modules/ javafx. graphics/ src/main/ java/com/ sun/javafx/ application/ HostServicesDel egate.java the upstream code seems to do that already, though I cannot tell whether that's the same version of runtime as you have.
On the snap side, it should be enough to use the `desktop` plug.