Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to change default browser for opening url-s ?

For sanity check, I tried:

xdg-open 'http://unix.stackexchange.com'

And it opens in other browser. I found information about assigning applications to filetypes with xdg-mime default xpdf.desktop application/pdf . However I don't know how to apply this knowledge for url ? Does url have mimetype ?

share|improve this question
up vote 5 down vote accepted

I'm assuming you want to change the default application opened for URLs
The easy way to change this is using gnome-control-center info and changing the default application.

Yes, the schema type is


each followed by the application.desktop you want to open http

Here is a sample mimeapps.list with chromium as the http app

share|improve this answer
I've assigned firefox with xdg-mime default firefox.desktop 'x-scheme-handler/http'... resulting in : cat ~/.local/share/applications/defaults.list = [Default Applications] x-scheme-handler/https=firefox.desktop x-scheme-handler/http=firefox.desktop , however it is still assigned to chrome when I run xdg-open 'http://unix.stackexchange.com' – Grzegorz Wierzowiecki Feb 10 '12 at 12:12
I had the exact same experience with the xdg-settings and xdg-mime default, even restarting the desktop, logging out/in didn't have the desired effect. But gnome-control-center info succeeded in changing from chromium to firefox and back again. xdg-open uses specified default. – bsd Feb 10 '12 at 13:32
Thanks ! In my case I needed to run KDE Control Center with systemsettings – Grzegorz Wierzowiecki Feb 10 '12 at 14:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.