Emacs GNU/Linux Free Software & Open Source Tutorials & Tips

Change your default browser to Chromium in Debian and Emacs

Chromium Logo

The web browser is nowadays the most important and frequently used tool in a computer. Recently I’ve been using more the Chromium browser than Firefox, on in Debian’s case, Iceweasel. This is for several reasons:

– Better memory management (doesn’t eat up all my RAM)
– Extensions are also available for Chromium
– Faster browser startup
– Faster page loads
– Full HTML5 support, which is lacking in Debian Wheezy’s Firefox (err… Iceweasel) which is still on version 3.5.19 at the time of this writing.

So I decided to change my default browser to open in Chromium for all applications. To do the change, at the terminal, type:

sudo update-alternatives --set x-www-browser /usr/bin/chromium


sudo update-alternatives --set www-browser /usr/bin/chromium

If you’re using KDE 4 you also need to open the System Settings, click on Default Applications, Select Web Browser and choose the second radio button option so it reads: “Open http and https URLs in the following browser” and type “chromium” in the text box. Click the Apply button and close the window.

Since I do almost everything with Emacs, I also needed to configure it to use Chromium as its default browser. To set that, you just need to add the following to your .emacs file:

(setq browse-url-browser-function 'browse-url-generic
      browse-url-generic-program "chromium-browser")

I still love Firefox, but it has staled away from the cool minimalistic and fast browser it was when it started. Chromium is now filling that gap, so I hope that in future versions (maybe the new Firefox 5?) memory handling gets better as well as loading times.

By Gabriel Saldaña

Gabriel Saldaña is a web developer, photographer and free software advocate. Connect with him on and Twitter

6 replies on “Change your default browser to Chromium in Debian and Emacs”

haha, says the one who switched to Google Chrome several months ago? 😛

Like I said, I still love Firefox and Mozilla, and will contribute whenever needed, but we can’t be blind about its current issues.

I’m still learning emacs so just a quick question.

I plan to use firefox so I would imagine that I just need to point to Firefox in the.emacs file.

Just quickly, how do you launch it within emacs? Sorry if this a nooby question.

Thanks for your time.

Yes, just replace the path to chromium with the path to your firefox program. You can do that by typing in the terminal: which firefox and it will return the path to it.

To launch it from emacs, if you set up the variables I mention, you can use M-x browse-url-generic. There are other options that you can explore by typing M-x browse-url and you’ll see all the other functions available.

Comments are closed.