1

I'm running XUbuntu 20.04 and have Brave, Chrome, and Firefox installed. I generally only use Brave these days unless I need to check something on one of the other two. Brave is set as my preferred browser in the Preferred Applications dialog:

enter image description here

Similarly, xdg-settings shows Brave as my default:

% xdg-settings get default-web-browser
brave-browser.desktop

Despite that, if I execute xdg-open some/on-disk/web/page.html it fires up Chrome. I rummaged around in my environment variables for XDG-related values but found nothing. Running xdg-open using bash -x I saw that it eventually runs exo-open. Running exo-preferred-applications just brought up the above dialog, so one would hope exo-open consults whatever database that uses. Still, it appears not to in all instances. Executing exo-open --launch WebBrowser does open Brave. Running it like this:

exo-open smontanaro/htmlcov/index.html

Chrome opens. Running it like this:

exo-open https://www.google.com/

Brave opens. I've yet to be able to construct a file: URL which brings up Brave. For example, In addition to the above relative path, this full path URL still fires up Chrome:

exo-open file:///home/skip/src/smontanaro.net/smontanaro/htmlcov/index.html

Why can't I seem to get Brave to open with an on-disk file: URL?

1 Answer 1

1

Associate the html mimetype to Brave rather than Chrome.

In Thunar, you can do this by right-click any html file, then "Open with", "Open with other application". Select the application, then do not forget to check the mark "Use as default for this kind of file" before hitting Open.

In Files (nautilus) on the default Ubuntu desktop, right-click the file to open Properties, then set the default application on the "Open With" tab.

2
  • Thanks. That (Thunar - Nautilus isn't installed on my system) seems to have solved the problem, though I didn't see any "Use a as default ..." checkbox. There must be some other database somewhere which exo-open consults other than what xdg-settings and exo-preferred-applications show me. Any idea where that is?
    – smontanaro
    Jan 23, 2022 at 20:02
  • The box is at the bottom of the dialog. Else, it may depend on the version of Thunar. For me, it is there in the version of Thunar that comes with Xubuntu 21.10. Else, it may depend on the version of Thunar. Perhaps older versions always change the default (so no opportunity to open only once with another app).
    – vanadium
    Jan 24, 2022 at 7:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .