Running Ubuntu 18.04 with Gnome Shell, when clicking on a hyperlink in Evince it opens in Firefox, instead of Chromium which I have set as my default browser.

I have set the default browser through the settings GUI, and also by running the following commands:

sudo update-alternatives --set x-www-browser /usr/bin/chromium-browser                                                                                                                    
sudo update-alternatives --set gnome-www-browser /usr/bin/chromium-browser
xdg-settings set default-web-browser chromium-browser.desktop

I have added the following lines to ~/.config/mimeapps.list:


I have verified that the following commands all open with Chromium:

xdg-open test.html
x-www-browser test.html
gnome-www-browser test.html
sensible-browser test.html

The BROWSER environment variable is unset by default on my system, but even when running Evince with this variable set links still open in Firefox:

BROWSER=/usr/bin/chromium-browser /usr/bin/evince test.pdf

What else can I try to make links clicked in Evince open in my default browser?

  • 1
    Related: askubuntu.com/q/669023/652
    – TRiG
    Sep 26, 2018 at 10:32
  • In that question (and there are several similar ones on the site) it appears the OS successfully determines the default browser, but that Chromium fails to open the file due to misconfiguration of Apparmor in some cases and .desktop files in others. I didn't find anything in these questions that addressed Firefox opening when a different browser was set as default. Sep 26, 2018 at 10:44

2 Answers 2


The following commands now work, allowing the default browser to be changed without even needing to restart Evince:

xdg-settings set default-web-browser firefox.desktop
xdg-settings set default-web-browser chromium-browser.desktop

I'm not sure why these did not work when I originally asked the question; I can only imagine that some factor was reset by restarting the system during my testing.


Same problem reported here: How to set default browser for PDF reader Evince on Linux?

Solving your issue is like voodoo, even when there are "protocols" regarding how and which applications are supposed to open a specific kind of file. You'll see that they're very inconsistent between systems and different desktop environments.

So there's no really a "right" answer. I had a similar problem with firefox, so I'm giving you my solution:

Create a ~/.local/share/applications/defaults.list if it doesn't exist

Add the following

[Default Applications]

...or just the last line if there's something before.

You must log in to answer this question.

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