[SOLVED] Change default browser on Mint 17.2 / XFCE

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

[SOLVED] Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

Default browser is set to firefox
I use opera
Even if you change it in the GUI ( settings -> settings manager -> preferred applications -> internet -> web browser ) to opera it will show opera icon but firefox remains default
Even if you enter /usr/bin/opera under 'other' , it still doesn't make a difference

Solution:
Edit the file below and change from firefox to opera
/usr/share/applications/defaults.list (symlink to /etc/gnome/defaults.list)
x-scheme-handler/http=opera.desktop
x-scheme-handler/https=opera.desktop

Firefox appears under more settings in this file, I didn't change them:
application/xhtml+xml=firefox.desktop
text/html=firefox.desktop
text/xml=gedit.desktop;pluma.desktop;firefox.desktop
Last edited by flyingrhino on Tue Nov 10, 2015 4:41 am, edited 3 times in total.
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

After updating packages yesterday, the above setting was reset to 'firefox'
However, changing it manually again worked :)

Looks like something is overwriting the file (not sure whether it is a bug in the settings manager, or the config file gets overwritten in the upgrade without respecting the older version)
Last edited by flyingrhino on Sun Nov 08, 2015 9:01 pm, edited 1 time in total.
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

... and again today it changed back to Firefox !

Does anyone know which program keeps reverting it back to default ?

Thanks
GeneBenson
Level 4
Level 4
Posts: 357
Joined: Fri Sep 17, 2010 9:55 pm

Re: Change default browser on Mint 17.2 / XFCE

Post by GeneBenson »

Hi flyingrhino,

In Firefox: Menu -> Edit -> Preferences -> General tab make sure "Always check if Firefox is your default browser" is not checked. :wink:
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

Hi
In Firefox: Menu -> Edit -> Preferences -> General tab make sure "Always check if Firefox is your default browser" is not checked
Thanks for the response but unfortunately it did not help

After changing everything I possibly could, here's how it reacts. First - Here are the all changes I made:

1. Change browser in XFCE (Settings -> Settings Manager -> Preferred applications -> Opera)
2015-11-09_003.png
2. Cancel firefox as default browser
Edit -> Preferences -> General -> Startup
2015-11-09_001.png
3. Change opera to default browser
Opera -> Settings -> Default Browser
2015-11-09_002.png
4. Change default browser in Thunderbird
Edit -> Preferences -> Advanced -> Config Editor ->
network.protocol-handler.warn-external.http -> Set to TRUE
network.protocol-handler.warn-external.https -> Set to TRUE
2015-11-09_006.png
Which then results in a prompt for new browser path the next time you click a link in email. Respond with /usr/bin/opera
This sorts out clicking links from Thunderbird - opens in Opera as configured

Now the strangeness -
When I make Opera the default browser from Opera's menu, Opera says it's the default browser. Then I go to XFCE settings manager and look at Web Browser setting - and it says 'No application selected'
Now I choose Opera in the pulldown menu (still in XFCE settings) , and it changes to Opera
Then I go back to Opera settings and Opera says it's not my default browser ! How strange

Trying to reboot (yes, I used to be a Windows user until my recent move to Mint, so the act of reboot to solve problems is still fresh in my mind...) , and still it misbehaves !

Well at least links from Thunderbird open in Opera which covers most use cases of invoking Opera from other applications
GeneBenson
Level 4
Level 4
Posts: 357
Joined: Fri Sep 17, 2010 9:55 pm

Re: Change default browser on Mint 17.2 / XFCE

Post by GeneBenson »

Hi flyingrhino,

I believe you need to:
1. Change browser in XFCE (Settings -> Settings Manager -> Preferred applications -> Opera)
and do not do:
3. Change opera to default browser

Doing #1 is enough. If, after this, a browser asks if you want it to be the default browser, then answer NO. At least that's how it works here.
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

[RESOLVED] Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

Hi,
Doing #1 is enough. If, after this, a browser asks if you want it to be the default browser, then answer NO. At least that's how it works here.
That seems to work, thanks !

Unintuitive, but [SOLVED] :)
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

Re: [SOLVED] Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

Before anything try this in Thunderbird:
Edit -> Preferences -> Attachments -> Incoming
Then edit "Content Type" / Action to choose your browser (in this case vivaldi)
2016-02-26_007.png
If it still doesn't work, continue down.
The following is a summary of the instructions from page https://kevinlocke.name/bits/2012/07/18 ... wser-linux , and credit goes to the author for the tips from his page

1.
In Thunderbird go to:
Edit -> Preferences -> Advanced -> General -> Config Editor ->
(This is the same as doing about:config)

2.
Then in the search bar type in:
network.protocol-handler.warn-external.ht
Which will come up with two results - http and https
2016-02-26_001.png
3.
Set them to True

4. When you next click on a link in Thunderbird , it will prompt for the application to open this link.


Note -
If you want to change it later, reset these two settings to default setting. Then restart Thunderbird and follow the above again


If it still doesn't work - try the rest of the instructions from this line onwards:

5. Check this page:
https://hsmak.wordpress.com/2009/09/03/ ... in-firefox
2016-02-26_005.png
In essence the same as #1 & #2 from above, with the changes of:
network.protocol-handler.app.http
And edit in your browser of choice (in this case I've chosen vivaldi)
(If it doesn't exist then in the blank window : Right click , New , String - then enter networ... and follow instructions)
I added http / https / ftp
2016-02-26_001.png
shelleyfrank

Re: [SOLVED] Change default browser on Mint 17.2 / XFCE

Post by shelleyfrank »

For clarity's sake..
Solution:
Edit the file below and change from firefox to opera
/usr/share/applications/defaults.list (symlink to /etc/gnome/defaults.list)
x-scheme-handler/http=opera.desktop
x-scheme-handler/https=opera.desktop
This is not exactly the correct solution, but it aught to work in most instances. Sometimes this file changes back to its original state when, say, an application is updated, and you will have to do it again. Also, you need to edit it in a root shell, which is not recommended.

A better approach is to edit the defaults.list in your home directory

Code: Select all

gedit ~/user/.local/share/applications/defaults.list
Inserting the values

Code: Select all

x-scheme-handler/http=opera.desktop
x-scheme-handler/https=opera.desktop
at the bottom of the file will override the value set in /usr/share/applications/defaults.list

When you type into the terminal

Code: Select all

 locate defaults.list
you will find that there are more than one defaults.list on your system. The defaults.list in your home folder is at the top of the stack and will receive precedence over the others. When my suggested edit above is missing from the defaults.list in your home folder you may find sometimes that firefox will still open when launced from certain gnome applications on your system like baobab. Try it by clicking the weblink in the about dialog of baobab. This implies that a gnome application receives an instruction from /etc/gnome/defaults.list and not from /usr/share/applications/defaults.list, which is the file suggested for edit by flyingrhino at the top of this post.

Adding the values above in ~/user/.local/share/applications/defaults.list will refer all applications on your system to the browser of your choice set in this file. Opera will be set as your system-wide web browser for the currently logged-in user account. You will have to edit the ~/user/.local/share/applications/defaults.list in any other user account if the same behaviour is required there.
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

Re: [SOLVED] Change default browser on Mint 17.2 / XFCE

Post by flyingrhino »

A better approach is to edit the defaults.list in your home directory
I didn't think of that, thanks !

I already knew about several config files present in my home directory (I have actually put stuff into my own ~/.bashrc) , but for some reason it never clicked to look for the defaults.list at home.... Good tip my friend.
edgar
Level 1
Level 1
Posts: 4
Joined: Mon Jan 27, 2020 9:23 am

Re: [SOLVED] Change default browser on Mint 17.2 / XFCE

Post by edgar »

Thanks. That worked for me in Linux Mint 18.3 Sylvia.
Locked

Return to “Xfce”