Announcement

Collapse
No announcement yet.

Default browser problem

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

  • dwlamb
    replied
    Originally posted by die.boer View Post
    gio mime considers a .desktop file valid if:
    Type=Application
    Exec= exists
    MimeType= includes the scheme requested
    Everything else is ignored.

    try this instead
    Code:
    sudo nano /usr/share/applications/thorium-shell.desktop
    remove this part MimeType=x-scheme-handler/http;x-scheme-handler/https;
    rebuild cache
    Code:
    update-desktop-database /usr/share/applications
    Before doing what you suggest I executed
    Code:
    gio mime x-scheme-handler/https brave-browser.desktop
    for testing purposes.

    Carrying what you suggest has no impact on

    Code:
    gio mime x-scheme-handler/https thorium-browser.desktop
    'gio' will still adopt 'thorium-browser.desktop' as the https handler even though 'x-scheme-handler/https;' has been removed from the 'MimeType'.

    There must be something in the 'deb' package that executes at time it is applied to set the 'gio mime x-scheme-handler/https thorium-browser.desktop'. When I reinstalled 'thorium-browser_130.0.6723.174_SSE3.deb' it solved this 'gio' problem.

    Leave a comment:


  • dwlamb
    replied
    Originally posted by claydoh View Post
    I spy Thorium Browser having three different .desktop files, if that matters.
    org.chromium.Thorium.desktop as well as the other two.

    A small snippet:

    Code:
    [Desktop Entry]
    # This is the same as thorium-browser.desktop except NoDisplay=true prevents
    # duplicate menu entries. This is required to match the application ID
    # used by XDG desktop portal, which has stricter naming requirements.
    # The old desktop file is kept to preserve default browser settings.
    NoDisplay=true
    Version=1.0
    Name=Thorium Browser​
    Is gio even relevant on KDE, or on the desktop proper? Just a random thought, and getting confused as to where it is used.
    org.chromium.Thorium.desktop is in Thorium version 138 and not relevant to the version 130 I am using. Once I get a handle on resolving this gio issue I plan to tackle upgrading to 138.

    gio is relevant in so far as it is the reason Brave was misinterpreted as the default browser when everything else on my system was pointing to Thorium as the default browser. Otherwise I'm with you on thinking Why is a utility for Gnome interfering with KDE?

    Leave a comment:


  • claydoh
    replied
    I spy Thorium Browser having three different .desktop files, if that matters.
    org.chromium.Thorium.desktop as well as the other two.

    A small snippet:

    Code:
    [Desktop Entry]
    # This is the same as thorium-browser.desktop except NoDisplay=true prevents
    # duplicate menu entries. This is required to match the application ID
    # used by XDG desktop portal, which has stricter naming requirements.
    # The old desktop file is kept to preserve default browser settings.
    NoDisplay=true
    Version=1.0
    Name=Thorium Browser​
    Is gio even relevant on KDE, or on the desktop proper? Just a random thought, and getting confused as to where it is used.

    Leave a comment:


  • die.boer
    replied
    gio mime considers a .desktop file valid if:
    Type=Application
    Exec= exists
    MimeType= includes the scheme requested
    Everything else is ignored.

    try this instead
    Code:
    sudo nano /usr/share/applications/thorium-shell.desktop
    remove this part MimeType=x-scheme-handler/http;x-scheme-handler/https;
    rebuild cache
    Code:
    update-desktop-database /usr/share/applications

    Leave a comment:


  • dwlamb
    replied
    On this,
    Originally posted by die.boer View Post
    ps:Thorium installed as thorium-shell.desktop, not thorium-browser.desktop
    politely, this is wrong, at least as far as my system. Thorium shell is a separate application. It does not launch the Thorium browser.

    Opening /usr/share/applications/thorium-shell.desktop and examining the Exec line it is:

    Code:
    Exec=/usr/bin/thorium-shell %U
    Opening /usr/share/applications/thorium-browser.desktop and examining the Exec line it is:

    Code:
    Exec=/usr/bin/thorium-browser %U
    When I installed Thorium on my system it created two desktop files:
    thorium-browser.desktop and
    thorium-shell.desktop

    thorium-browser.desktop is what appears in entries of ~/.config/mimeapps.list
    thorium-browser.desktop is what appears in update-alternatives

    Under /usr/bin/ path there are:
    /usr/bin/thorium-shell
    /usr/bin/thorium-browser-stable -> /opt/chromium.org/thorium/thorium-browser
    /usr/bin/thorium-browser -> /opt/chromium.org/thorium/thorium-browser

    If I follow your guidelines, this is the result of using thorium-shell.desktop as the 'x-scheme-handler/https'
    thorium-shell rendering

    The same url opened in a new window of thorium I manually open
    thorium browser rendering

    Is it possible you downloaded and installed Thorium to help provide an answer?

    Based on the answer you provided, it raised the questions in my mind, 'How could this be? Has there been a change in the Thorium package?' I downloaded and installed a newer version than the version on my system. On a fresh install, the set-up of thorium-shell and thorium-browser are exactly as you presented and shared.

    But that fresh install is broken for it does not open thorium browser in an interface similar to Chromium or Google Chrome. From this fresh install I would rewrite the exec lines in the .desktop files or open a ticket on the Thorium support board.

    Reinstalling the older version of Thorium on the system fixed the original problem.

    Code:
    >     gio mime x-scheme-handler/https
    Default application for “x-scheme-handler/https”: thorium-browser.desktop
    Registered applications:
            thorium-browser.desktop
            waterfox.desktop
            thorium-shell.desktop
            brave-browser.desktop
            com.brave.Browser.desktop
            kfmclient_html.desktop
            vivaldi-stable.desktop
            firefox_firefox.desktop
    Recommended applications:
            thorium-browser.desktop
            waterfox.desktop
            thorium-shell.desktop
            brave-browser.desktop
            com.brave.Browser.desktop
            kfmclient_html.desktop
            vivaldi-stable.desktop
            firefox_firefox.desktop


    What does gio mime look for in a desktop file in order for it to be considered a possible alternative?

    Leave a comment:


  • die.boer
    replied
    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​

    Leave a comment:


  • skyfishgoo
    replied
    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

    Leave a comment:


  • dwlamb
    replied
    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.

    Leave a comment:


  • dwlamb
    replied
    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
    ​

    Leave a comment:


  • die.boer
    replied
    please post output of
    Code:
    echo $BROWSER
    Code:
    gio mime x-scheme-handler/http
    Code:
    gio mime x-scheme-handler/https​

    Leave a comment:


  • claydoh
    replied
    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.

    Leave a comment:


  • Qqmike
    replied
    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

    Leave a comment:


  • dwlamb
    started a topic [RESOLVED] Default browser problem

    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:
    ```​
    Last edited by dwlamb; Apr 22, 2026, 10:02 PM.

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X