How do I know a custom “preferred web browser” if they use the Gnome desktop environment? (I want to open a web page, I do not need to know which browser the user prefers.)
Some prerequisites: I am trying to open a browser window (my home page) using my Java application.
- if Java version 1.6+, use Desktop.browse (url);
- otherwise, use BareBonesBrowserLaunch.openURL (url) - this means checking the environment and launching the browser using Runtime.getRuntime (). exec ()
Method 2 runs on Windows just fine; and opens a browser on Linux. However, this is the first browser that it finds (in my case, it first searches for Firefox). In the Gnome desktop environment (for example, Ubuntu Linux by default), you can install Preferred Applications for email, browsing the Internet, etc .; I believe this information is available somewhere. How to find out which user prefers a browser?
In other words: where does Gnome save the Preferred Browser setting ?
source
share