How do I change my default browser?
Solution 1
Have a look at your system-settings
-> Details
:
(Note that in older versions of Ubuntu Details
is called System Info
)
Solution 2
This is an ubuntu way of doing this
sudo update-alternatives --config x-www-browser
sudo update-alternatives --config gnome-www-browser
Solution 3
If your preferred browser isn't in that menu or you prefer doing it from the command line, this command will let you do the same thing as in fossfreedom's answer:
xdg-settings set default-web-browser name-of-browser.desktop
E.g.:
xdg-settings set default-web-browser firefox.desktop
or
xdg-settings set default-web-browser chromium-browser.desktop
or
xdg-settings set default-web-browser google-chrome.desktop
Solution 4
All preferences about default applications your user located in file "mimeapps.list". I am use Gnome 3 and Debian, so for me it is ~/.config/mimeapps.list
.
I you don`t know where is may be located this file, try command:
locate mimeapps.list
For override default a web browser you need, at least, change values in category [Default Applications]
- x-scheme-handler/http
- text/html
- application/xhtml_xml
- image/webp
- x-scheme-handler/https
- x-scheme-handler/ftp
- x-scheme-handler/https
- x-scheme-handler/ftp
and in category [Added Associations]
- text/html
- text/xml
- application/xhtml_xml
- image/webp
- x-scheme-handler/https
- x-scheme-handler/ftp
For Opera the file ~/.config/mimeapps.list
must contains:
[Default Applications]
x-scheme-handler/http=opera-browser.desktop
text/html=opera-browser.desktop
text/xml=opera-browser.desktop
application/xhtml_xml=opera-browser.desktop
image/webp=opera-browser.desktop
x-scheme-handler/https=opera-browser.desktop
x-scheme-handler/ftp=opera-browser.desktop
[Added Associations]
text/html=opera-browser.desktop;
text/xml=opera-browser.desktop;
application/xhtml_xml=opera-browser.desktop;
image/webp=opera-browser.desktop;
x-scheme-handler/https=opera-browser.desktop;
x-scheme-handler/ftp=opera-browser.desktop;
Try it (must be open in Opera, if it installed)
xdg-open somehtmlfile.html
For Chrome the file ~/.config/mimeapps.list must contains:
[Default Applications]
x-scheme-handler/http=google-chrome.desktop
text/html=google-chrome.desktop
text/xml=google-chrome.desktop
application/xhtml_xml=google-chrome.desktop
image/webp=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/ftp=google-chrome.desktop
[Added Associations]
text/html=google-chrome.desktop;
text/xml=google-chrome.desktop;
application/xhtml_xml=google-chrome.desktop;
image/webp=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;
x-scheme-handler/ftp=google-chrome.desktop;
Try it (must be open in Chrome, if it installed)
xdg-open somehtmlfile.html
And so on (Firefox, or something else).
You need only override desire mimetypes. But I recommend use GUI for it. It will be reduce amount of errors.
It is actual for me system and will be change from system to system, from desktop environment to desktop environment, and so on.
Testing environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
$ uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
$s gnome-session --version
gnome-session 3.14.0
Solution 5
System -> Control Center -> Preferred Applications
for ubuntu with MATE DESKTOP
Related videos on Youtube
![Ederico](https://i.stack.imgur.com/EQzyQ.jpg?s=256&g=1)
Ederico
Updated on September 18, 2022Comments
-
Ederico almost 2 years
Is there an option to change my default browser for all my applications?
-
Mike over 10 yearsWow, that's a pretty stupid place to put it! Almost as bad as having to go to "settings" to turn off your computer in Windows 8.
-
Flimm over 10 yearsThis is a system-wide change, and should be done in addition to fossfreedom's answer.
-
Stew about 10 yearsI tried all the answers here; only the second of these two lines changed the browser in which browser-external links (e.g. from Pidgin) opened.
-
diEcho almost 10 yearsin ubuntu 14.04 [cinnamon theme] navigate to
System Settings > Preferred applications
-
Jetson Earth over 9 yearsThis does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
-
Adrian Castravete over 9 yearsI thought this still answered the question for Skype for which as far as I know, the changes in the top answer don't influence how skype chooses the default application in all conditions. The answer is here to help users in case the first one does not. If this can be done by responding with comments to the first answer I will do just that. :) Thank you for the heads up!
-
David Tod over 9 yearsGot your point, Adrian – just sitting in the same boat. Still, that didn't solve it for me. What solved it, was this answer. But that might be due to the fact I'm using LXDE as desktop.
-
Winny almost 9 yearsTo launch this on Ubuntu 14.04 from the CLI try
unity-control-center
askubuntu.com/questions/116655/… -
user11153 almost 9 yearsThis is not working for me on 15.04
-
Anaphory over 7 yearsHow do I make an application show up in there?
-
Geppettvs D'Constanzo about 7 yearsThis is the most appropriate way to do this, working for i3WM and other desktop environments where terminals rules. Thank you for sharing.
-
black_puppydog almost 7 yearsFor SEO reasons: this works with i3wm when chrome sneaks into
x-www-browser
andupdate-alternatives
is out of reach because it requiressudo
. You need to havemy-application.desktop
available, for example in~/.local/share/applications/my-app.desktop
. But you don't pass the entire path toxdg-settings
, only the file name. -
Étienne about 6 yearsThis didn't work for me on ubuntu 16.04 (was trying to change the browser used by thunderbird to open links). The accepted solution worked.
-
acostela over 5 yearsTo access this from CLI use
gnome-control-center
and go toSystem > Details
. You will also need to useupdate-alternatives
from Sergey P. aka azure's answer below, since different programs reads settings from different sources. -
Yngvar Kristiansen over 4 yearsIn Xubuntu/XFCE, "GUI" means the
Settings > MIME Type Editor
. -
Adrian Lopez about 4 yearsThis is the right solution. It works on every distro.
-
Bernardo Ferreira Bastos Braga about 4 yearsI tried all the options above and this one solved control+clicking links in the terminal window
-
Murphy almost 4 yearsDidn't work for me for Vivaldi on 18.04.
-
Timo over 3 yearsI cannot find it in Lubuntu 20_04