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 ?


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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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