Brave does not open links clicked when set as default browser

Troubleshooting technical issues is much easier when both the user and support agent practice clear communication. For this reason, we have provided the template below for you to fill out with information about your issue. Please provide as much detail as possible so we can most efficiently resolve your problem.

Delete the any text above the line separator below before posting

Brave does not open links clicked when set as default browser on Linux

  1. Go to link on a word document or pdf
  2. Click on link
  3. Brave opens a new window with only the startpage and does not navigate to the site clicked.

Brave opens a new window and navigates to the site clicked

Brave version 1.11.101 on Linux

Enabling sync in brave:flags makes brave crash


This is expected behavior – Sync v2 will be out with the next major browser update and will resolve this issue.

As for the issue with default apps, can you please tell me what version of Linux you’re running?

1 Like

I am currently running Ubuntu 16.04

Thank you for clarifying.

So on my end, I’m unable to reproduce this issue. I followed these steps:

  1. Downloaded the BAT Whitepaper PDF file to local storage.
  2. Made sure Brave was set as the Default web browser.
  3. Found the PDF file, Right-click --> Properties --> Open With
  4. Selected Brave from the drop down list, then selected the Set as default button at the bottom.
  5. Open the downloaded PDF file

The PDF opened in-browser as expected, displaying the contents of the PDF. Can you confirm that my steps are accurate?

1 Like

Not really.

Steps 1 and 2 are accurate, however, for the following steps

  1. Open the pdf with anything else other than brave

  2. Go to page 16 and left click publisher client.

Expected results: It should open the link on brave since its the default browser.

Observed results: See attached image.

Here are a couple of checks you can run on the command line in order to see what the default browser is set to in multiple contexts:

  • xdg-settings get default-web-browser
  • xdg-mime query default x-scheme-handler/http
  • xdg-mime query default x-scheme-handler/https
  • ls -l /etc/alternatives/x-www-browser
  • ls -l /etc/alternatives/gnome-www-browser

Are all of these set to Brave on your machine?


xdg-settings get default-web-browser --> brave-browser.desktop
xdg-mime query default x-scheme-handler/http --> brave-browser.desktop
xdg-mime query default x-scheme-handler/https --> brave-browser.desktop
ls -l /etc/alternatives/x-www-browser --> lrwxrwxrwx 1 root root 29 Dec 3 2018 /etc/alternatives/x-www-browser -> /usr/bin/google-chrome-stable*

Thanks, so that last one is the problem. To mark Brave as your default browser instead of Chrome, run this:

sudo update-alternatives --config x-www-browser
1 Like

I tried this but still got the same error

Ah, sorry for the false leads, I think I know exactly what’s happening. I believe you have AppArmor enabled and that this is what is causing the “permission denied” error.

To confirm that this is the case, install the following package:

apt install apparmor-notify

and then logout and log back into your user account (no need to do a full reboot).

Then when you click a link in a PDF, you should see a message similar to this one:
Screenshot from 2020-07-30 11-29-00

I filed a bug against the apparmor package in Ubuntu, but if you’d like to fix it on your machine, here’s how I did it on my machine. All of these steps need to be done as the root user.

Add the following line at the end of /etc/apparmor.d/abstractions/ubuntu-browsers:

/opt/{,-beta,-dev,-nightly}/brave-browser{,-beta,-dev,-nightly} Cx -> sanitized_helper,

and the following lines just after the block of /opt/google/chrome lines in /etc/apparmor.d/abstractions/ubuntu-helpers:

/opt/{,-beta,-dev,-nightly}/chrome-sandbox PUxr,
/opt/{,-beta,-dev,-nightly}/brave-browser{,-beta,-dev,-nightly} Pixr,
/opt/{,-beta,-dev,-nightly}/brave Pixr,
/opt/{,-beta,-dev,-nightly}/{,**/}lib*.so{,.*} m,

Then reload the AppArmor configuration for the PDF viewer (evince):

apparmor_parser -T -W -r /etc/apparmor.d/usr.bin.evince
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.