Announcement

Collapse
No announcement yet.

Default browser problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Default browser problem

    Outside of `xdg-settings`, `mimeapps.list` and `update-alternatives` where can a system be getting a value for default application?

    My system is opening links in Brave browser even though it is not my default browser.

    In Sublime Text if I right click on a link and choose the option to open that URL in a browser, Brave browser will open.

    image of url link dialog box in Sublime Text

    In the Java application DBeaver if I am prompted with a software update screen and click to view the details , the system redirects to Brave browser.

    In Thunderbird if I click on a web link in an e-mail, it opens in Brave. Refining this functionality in Thunderbird yields an interesting clue. If I navigate to the Preferences section (Menu Edit > Settings scroll down to ‘Files & Attachments’ ) for opening applications `http` and `https` offer choices.

    image of file & Attachments section in Thunderbird preferences

    Where is Thunderbird getting the idea Brave is the default browser? Everything else in my system is pointing towards Thorium.

    In Brave settings, setting Brave as the default is unchecked. Any *.desktop shortcuts for Brave on the system have the `--no-default-browser-check` flag on the command line syntax.

    In `~/.config/mimeapps.list` any values with `thorium-browser.desktop` are closer to the top than `com.brave.Browser.desktop` or `brave-browser.desktop`.

    In `update-alternatives` these are the outputs for `gnome-www-browser`, `www-browser` or `x-www-browser​`:

    Code:
    ```bash
    > sudo update-alternatives --get-selections | grep brow
    ```
    ```text
    gnome-www-browser auto /usr/bin/thorium-browser
    infobrowser auto /usr/bin/info
    www-browser auto /usr/bin/thorium-browser
    x-www-browser auto /usr/bin/thorium-browser
    ```
    Code:
    ```bash
    xdg-settings check default-web-browser thorium-browser.desktop
    yes
    ```
    Code:
    ```bash
    > sudo update-alternatives --config gnome-www-browser
    ```
    ```text
    There are 4 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser).
    
    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/thorium-browser 200 auto mode
    1 /usr/bin/brave-browser-stable 10 manual mode
    2 /usr/bin/thorium-browser 200 manual mode
    3 /usr/bin/waterfox 40 manual mode
    ```
    Code:
    ```bash
    > sudo update-alternatives --config x-www-browser
    ```
    ```text
    There are 3 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).
    
    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/thorium-browser 200 auto mode
    1 /usr/bin/brave-browser-stable 100 manual mode
    2 /usr/bin/thorium-browser 200 manual mode
    3 /usr/bin/waterfox 40 manual mode
    
    Press <enter> to keep the current choice[*], or type selection number:
    ```
    Code:
    ```bash
    sudo update-alternatives --config www-browser
    ```
    ```text
    There are 2 choices for the alternative www-browser (providing /usr/bin/www-browser).
    
    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/thorium-browser 200 auto mode
    1 /usr/bin/brave-browser-stable 10 manual mode
    2 /usr/bin/thorium-browser 200 manual mode
    
    Press <enter> to keep the current choice[*], or type selection number:
    ```​

    #2
    Have you looked at K > System Settings > [Personalization] > Applications > Default Applications > Web Browser ?

    That's where I've managed to fix this issue with Firefox versus Chrome.
    I do recall that after making a choice, I had to do something ...
    like close everything, restart the PC, and then it would take full effect.

    (On this subject, I can see you are a more advanced user! more so than I am :-) )
    Last edited by Qqmike; Apr 16, 2026, 06:41 AM. Reason: Added "Default Applications" to the path
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Originally posted by dwlamb View Post
      ` where can a system be getting a value for default application?
      What does the Default Applications section in System Settings show, not the file associations part?


      Check each app's settings, often this is a cuplprit, if they have options for this.
      Tbird (and Firefox) usually honors the system settings, or rather imports those, or something similar, but is well known to get broken sometimes.

      Use XDG tools to see what is listed; the www-browser and update-alternatives things are not used everywhere, and are not as relevant these days, especially for Flaptaks and Snaps; in general xdg is what is being used overall.

      The command x-www-browserfor me opens Chrome, but otherwise my default is FF in System Settings and via XDG, which is honored everywhere for me. Including Dbeaver installed as a flatpak to test.

      This is on Plasma 6, I don't have a Plasma 5 install any longer; I just upgraded my secondary PC to 26.04, and my main runs neon, which is 24.04, but does have upgraded XDG parts. So if there is a bug in 24.04, I am not able to see it at the moment.

      Code:
      $ xdg-settings get default-web-browser
      firefox.desktop
      
      $ update-alternatives --display x-www-browser
      x-www-browser - auto mode
      link best version is /usr/bin/google-chrome-stable
      link currently points to /usr/bin/google-chrome-stable
      link x-www-browser is /usr/bin/x-www-browser
      slave x-www-browser.1.gz is /usr/share/man/man1/x-www-browser.1.gz
      /usr/bin/firefox - priority 100
      slave x-www-browser.1.gz: /usr/share/man/man1/firefox.1.gz
      /usr/bin/google-chrome-stable - priority 200
      /usr/bin/konqueror - priority 30
      slave x-www-browser.1.gz: /usr/share/man/man1/konqueror.1.gz
      Basically, tl;dr look at xdg settings and system settings, not the more legacy update-alternatives things.
      Last edited by claydoh; Apr 16, 2026, 06:40 AM.
      Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
      HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
      HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux

      Comment


        #4
        please post output of
        Code:
        echo $BROWSER
        Code:
        gio mime x-scheme-handler/http
        Code:
        gio mime x-scheme-handler/https​
        ʟɨռʊӼ ʄօʀ ʟɨʄɛ

        Comment


          #5
          Under System Settings > Applications > Default Applications the Thorium Browser is set as the default Web Browser.

          I do no use Flatpaks or Snaps. So the existence of one of those overriding other default preferences is a non-factor.

          ​Rebooting the system had no effect.

          The commands and output of xdg-settings and update-alternatives:

          Code:
          > update-alternatives --display x-www-browser
          x-www-browser - auto mode
          link best version is /usr/bin/thorium-browser
          link currently points to /usr/bin/thorium-browser
          link x-www-browser is /usr/bin/x-www-browser
          /usr/bin/brave-browser-stable - priority 100
          /usr/bin/thorium-browser - priority 200
          /usr/bin/waterfox - priority 40
          
          ​> xdg-settings check default-web-browser thorium-browser.desktop
          yes
          
          > xdg-settings get default-web-browser
          thorium-browser.desktop
          ​

          Comment


            #6
            Originally posted by die.boer View Post
            please post output of
            Code:
            echo $BROWSER
            Code:
            gio mime x-scheme-handler/http
            Code:
            gio mime x-scheme-handler/https
            We have a winner for discovering what is pointing to brave-browser.desktop!

            Code:
            > echo $BROWSER
            
            
            > gio mime x-scheme-handler/http
            Default application for “x-scheme-handler/http”: brave-browser.desktop
            Registered applications:
                  waterfox.desktop
                  com.brave.Browser.desktop
                  kfmclient_html.desktop
                  thorium-shell.desktop
                  vivaldi-stable.desktop
                  firefox_firefox.desktop
            Recommended applications:
                  waterfox.desktop
                  com.brave.Browser.desktop
                  kfmclient_html.desktop
                  thorium-shell.desktop
                  vivaldi-stable.desktop
                  firefox_firefox.desktop
            
            > gio mime x-scheme-handler/https
            No default applications for “x-scheme-handler/https”
            Attempting to correct this handler I did 'man gio'. From the man page:

            Code:
            mime MIMETYPE [HANDLER]
                       If no handler is given, the mime command lists the registered and recommended
                       applications for the mimetype. If a handler is given, it is set as the default handler
                       for the mimetype.
            
                       Handlers must be specified by their desktop file name, including the extension.
                       Example: org.gnome.gedit.desktop.
            Absent from the list of Registered applications above is an entry for thorium-browser.desktop.

            If I try 'gio mime x-scheme-handler/http thorium-browser.desktop', this is the response:

            Code:
            gio: Failed to load info for handler “thorium-browser.desktop”
            I have tried putting 'thorium-browser.desktop' in '/usr/share/applications/' or '~/.local/share/applications/' singularly one location or both locations simultaneously and re-run 'gio mime x-scheme-handler/http thorium-browser.desktop'. Each time the result has been:

            Code:
            gio: Failed to load info for handler “thorium-browser.desktop”
            I can not find anything in web searches using "register desktop file gio" other than links to the gio manpage.

            How do I fix 'gio mime x-scheme-handler/http' to point to "thorium-browser.desktop"?

            As a side question, desktop files can be in '/usr/share/applications/' or '~/.local/share/applications/'. Does the system look in both those locations or just '/usr/share/applications/' for 'gio' or files referenced in '~/.config/mimeapps.list'​?
            Last edited by dwlamb; Apr 16, 2026, 10:41 PM. Reason: Edited to fix punctuation.

            Comment


              #7
              when i click on web links within parts of the kde desktop like help functions, etc it opens the link in falkon instead of my default browser (firefox) which i find handy so that it does not disturb my tabs in firefox.

              when i go to file associations in settings, i see that if i search for .html in the search box, i find that:

              under the known types listed as "applications", the setting is to open in a separate viewer

              and under the known types listed as "xhtml+xml" the top application is falkon

              then under the known types listed as "html" the top application is the zen browser which was the last one i installed

              so, i would look in settings > file associations drill down into the mimetype you are seeking to control
              some stuff i did: https://github.com/droidgoo

              Intel® Core™ i7-14700K | 64 GiB of RAM | AMD RX 6800

              Comment


                #8
                run these
                Code:
                gio mime x-scheme-handler/http thorium-shell.desktop
                Code:
                gio mime x-scheme-handler/https thorium-shell.desktop​
                update XDG
                Code:
                xdg-mime default thorium-shell.desktop x-scheme-handler/http
                Code:
                xdg-mime default thorium-shell.desktop x-scheme-handler/https​
                rebuilt cache
                Code:
                update-desktop-database ~/.local/share/applications
                Thunderbird, DBeaver, Sublime should all switch immediately (no reboot needed).​

                ps:Thorium installed as thorium-shell.desktop, not thorium-browser.desktop​
                ʟɨռʊӼ ʄօʀ ʟɨʄɛ

                Comment

                Users Viewing This Topic

                Collapse

                There are 0 users viewing this topic.

                Working...
                X