Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 2 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

x-scheme-handler/http=
x-scheme-handler/https=

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. –  bdowning 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
add comment

Your Answer

 
discard

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.