Steps to reproduce: 1) have Firefox 2) install Chrome 3) now, when running xdg-open http://google.com, you'll get Chrome 4) go to all settings -> preferred application -> select Firefox (if it wasn't already selected). 5) run again xdg-open http://google.com => you'll get Chrome 6) optionally, I tried to swtich to Chrome then back to Firefox from Preferred Applications. Same result. If I have Firefox set as my default Browser, I'd expect the URL to be opened by Firefox. This affects several programs which rely on xdg-open command. One example is IRC xchat2.
I forgot to mention that I tested on on 2 machines, one is a vanilla Xubuntu 15.04, the other was a Ubuntu 12.04 transformed to Xubuntu 12.04 and then upgraded to Xubuntu 15.04.
When I select default web browser in settigs, it doesn't become default system-wide. My default browser was firefox. Then I installed google-chrome. Some apps still open links in firefox (banshee). xdg-mime default google-chrome.desktop x-scheme-handler/http solves this. I think if this script were ran when I select google-chrome, there would be no problems with default browsers. Is it the same bug?
And in when firefox when I click "show in folder" in downloads - folder opens in Nautilus, not in thunar. (Ubuntu Unity was my first DE, before XFCE, I haven't changed my profile directory)