Results 1 to 5 of 5

Thread: Java applications ignore default browser setting

  1. #1
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    975

    Default Java applications ignore default browser setting

    I am using Tumbleweed 20170712 with KDE-Plasma 5.10.3. Even bsh2 will open Chrome instead of Firefox default browser:

    Code:
    karl@hofkirchen:~> bsh2
    BeanShell 2.0.0.b6 - by Pat Niemeyer (pat@pat.net)
    bsh % Desktop.getDesktop().browse(new URI("http://jalbum.net"));
    ^C^Ckarl@hofkirchen:~>
    Any idea how to change this and have bsh2 open the default browser?
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,268
    Blog Entries
    2

    Default Re: Java applications ignore default browser setting

    I skimmed what documentation I could find, most particularly the following
    http://jmeter.apache.org/usermanual/...reference.html

    I couldn't find anything that looks like how to specify a particular web browser. Actually, my impression is that beanshell is mostly not much different than sending various HTTP or Javascript commands in any shell.

    So, I suspect that your problem won't be found in beanshell but in your web browser settings, first whether the default browser really is FF and secondarily whether there is some kind of required dependency that is provided by Chrome (Is it really Chrome or Chromium?) vs Firefox.

    Just as an aside, I assume you know that a lot can be done with command line HTTP calls without invoking a browser... And, that's regardless whether you use beanshell or not.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    975

    Default Re: Java applications ignore default browser setting

    Quote Originally Posted by tsu2 View Post
    I skimmed what documentation I could find, most particularly the following
    http://jmeter.apache.org/usermanual/...reference.html

    I couldn't find anything that looks like how to specify a particular web browser. Actually, my impression is that beanshell is mostly not much different than sending various HTTP or Javascript commands in any shell.

    So, I suspect that your problem won't be found in beanshell but in your web browser settings, first whether the default browser really is FF and secondarily whether there is some kind of required dependency that is provided by Chrome (Is it really Chrome or Chromium?) vs Firefox.

    Just as an aside, I assume you know that a lot can be done with command line HTTP calls without invoking a browser... And, that's regardless whether you use beanshell or not.

    TSU
    The problem is that KDE uses .config/mimeapps.list while Java looks at .local/share/applications/mimeapps.list. I worked around this by adding to the latter:
    Code:
    karl@hofkirchen:~> cat ./.local/share/applications/mimeapps.list
    [Default Applications]
    text/plain=org.kde.kwrite.desktop;
    text/html=firefox.desktop;
    text/htmlh=firefox.desktop;
    x-scheme-handler/http=firefox.desktop
    x-scheme-handler/https=firefox.desktop
    karl@hofkirchen:~>
    Now all Java applications use Firefox.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    975

    Default Java applications use default browser setting in GNOME but not in KDE

    Digging a little deeper I installed Gnome Desktop (a single click in Yast ), logged out, changed to Gnome and logged in. Java installations indeed work without tinkering with mimeapps.list! Thus I think there is a bug in KDE Plasma which needs fixing. Any comment?
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  5. #5
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    975

    Default Define x-scheme-handler

    No scheme handler is defined by default:
    Code:
    karl@hofkirchen:~> gio mime x-scheme-handler/http
    Keine Vorgabeanwendungen für »x-scheme-handler/http«
    karl@hofkirchen:~>
    Adding the following resolves this issue:
    Code:
    karl@hofkirchen:~> gio mime x-scheme-handler/http firefox.desktop
    Set firefox.desktop as the default for x-scheme-handler/http
    karl@hofkirchen:~> gio mime x-scheme-handler/https firefox.desktop
    Set firefox.desktop as the default for x-scheme-handler/https
    karl@hofkirchen:~> gio mime x-scheme-handler/https
    Standardanwendung für »x-scheme-handler/https«: firefox.desktop
    Registrierte Anwendungen:
            firefox.desktop
            chromium-browser.desktop
    Empfohlene Anwendungen:
            firefox.desktop
            chromium-browser.desktop
    karl@hofkirchen:~>
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •