OS=Debian stretch, running LXDE
Clicking on URL links from within non-browser programs, such as pidgin or Thunderbird does not open the links. I discovered that the default browser is set to thunderbird.desktop
... very odd... don't ask me how that got set.
$ xdg-settings get default-web-browser
thunderbird.desktop
Trying to set the default browser with xdg-settings does not work:
xdg-settings set default-web-browser firefox-esr.desktop
$ xdg-settings get default-web-browser
thunderbird.desktop
Interestingly update-alternatives --get-selections shows firefox-esr as the default browser.
$ update-alternatives --get-selections |grep browser
gnome-www-browser auto /usr/bin/firefox-esr
infobrowser auto /usr/bin/info
www-browser auto /usr/bin/w3m
x-www-browser auto /usr/bin/firefox-esr
I also tried an entry in ~/.local/share/applications/defaults.list
$ cat ~/.local/share/applications/defaults.list
text/html=firefox-esr.desktop;
Nothing is working. Any help appreciated.
Update:
These lines in ~/.config/mimeapps.list
were set to thunderbird.desktop
. I changed them to firefox-esr.desktop
, but still no change.
application/x-extension-htm=firefox-esr.desktop
application/x-extension-html=firefox-esr.desktop
application/x-extension-shtml=firefox-esr.desktop
application/xhtml+xml=firefox-esr.desktop
application/x-extension-xhtml=firefox-esr.desktop
application/x-extension-xht=firefox-esr.desktop
Update:
The command xdg-mime query filetype index.html
comes back empty. In fact it comes back empty with other filetypes as well. This has to mean something. However mimetype works.
$ mimetype index.html
index.html: text/html
[SOLVED] as per Xen2050's answer
Here is a summary of what I did, in case others have a similar problem:
I had to find all ''mimeapps.list'' and ''defaults.list'' files:
locate mimeapps.list
locate defaults.list
Then delete them...
rm ~/.config/mimeapps.list
...
Then run:
update-desktop-database
In my case I got an error message about a faulty mime-type with evince (sorry, can't remember the exact message). So i purged evince:
apt-get purge evince
apt-get purge thunderbird #just for good measure
Try again:
update-desktop-database
The problem was still not solved, so I went on to install ''exo-preferred-applications'', which in Debian is the package ''exo-utils''. Then reinstall thunderbird. I don't need evince so didn't reinstall it.
apt-get install exo-utils
apt-get install thunderbird
Then ran ''exo-preferred-applications''. Firefox was not listed under "Web Browsers", so I chose ''other'' and pasted in ''firefox-esr.desktop''. Then ran:
update-desktop-database
Working!!!:
$ xdg-mime query default x-scheme-handler/http
firefox-esr.desktop
$ xdg-mime query default x-scheme-handler/https
firefox-esr.desktop
The original problem of clicking on links in non-browser applications is also now solved.