In Ubuntu I used

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

to set the default internet browser manually.

enter image description here

In Manjaro I get:

sudo: update-alternatives: command not found

I have set Firefox as the default in its settings and want it to stay so.

After installing Chromium, the default browser is now Chromium, although I reconfirmed Firefox as such and in Chromnum settings it says: "Chromium cannot determine or set the default browser".

How to make Firefox default browser?

  • Does manjaro have the x-www-browser symlink? And to what it links? Also, is update-alternatives available in Manjaro? – Braiam Oct 8 '15 at 12:21
  • @Braiam - No. And no, not even in AUR. – user32012 Oct 8 '15 at 15:20
  • If your system doesn't have x-www-browser, what is “changing the linked binary” supposed to mean? Are you trying to change the default browser? That depends on the application that launches it — I don't think Manjaro has a system-wide default (and it's more of a user preference anyway). What application are you interested in? – Gilles Oct 8 '15 at 22:58
  • @Gilles - that phrasing of the title is due to the edit made by Braiam, while I was just asking out of curiosity thinking that the ubuntu option would be available in Manjaro. If not, that's my answer. (Installing Chromium, it took over as default browser. I think I fixed it simply from the FF GUI.) – user32012 Oct 9 '15 at 7:09
  • 1
    @cipricus Oh, I see, sorry. Your original title was misleading too. Once again, I don't think Manjaro has a system-wide or per-user default, so you'll get better help if you mention which applications you use that launch a browser. – Gilles Oct 9 '15 at 9:47
xdg-settings set default-web-browser chromium.desktop
  • 1
    Where chromium is whatever you'd type at the command prompt to start your preferred browser. Eg, it could be google-chrome-stable. – Tom Hale May 27 '17 at 7:16
  • Works for voidlinux with i3. – xoryves Jun 7 '18 at 8:30
  • 1
    Does not work on Manjrao I3: xdg-settings: $BROWSER is set and can't be changed with xdg-settings, but Anas answer worked: unix.stackexchange.com/a/434465/28262 – Florian Brinker Nov 20 '18 at 15:43

For users of i3wm, in addition to editing ~/.config/mimeapps.list and ~/.i3/config, you also need to change $BROWSER from ~/.profile, set it to /usr/bin/chromium, to prevent browser sessions emerging from the terminal from opening the wrong browser.

  • 4
    Actually, I find that this is the only solution that solved my problem. This is a separate answer. For applications that open the default browser (such as Jupyter) changing just the key bindings won't work. – Ébe Isaac May 11 '18 at 7:01
  • for me removing the palemoon package was also required pacman -R palemoon-bin – akiva Feb 24 at 21:42

In case someone else has the same issue…

Edit your config file:

nano ~/.i3/config 

and change

bindsym $mod+F2 exec …

to your browser of choice (e.g. bindsym $mod+F2 exec google-chrome-stable) Save and reload your config file (mod+Shift+R)

Should be all set…

  • 1
    This seems overly i3-centric. – Arnaud Meuret Mar 31 '18 at 9:22
  • Yes... it was. Now on xfce, which Tom addresses below. – chris.r Dec 4 '18 at 2:15

Edit your ~/.config/mimeapps.list and replace references to firefox.desktop with google-chrome.desktop.

If you use google-chrome-stable to launch chrome, use that instead, followed by .desktop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy