Running XFCE4 and setting the preferred applications generally works. However, I noticed that some applications still would not listen to my demands of using a specific browser when launching links. For example, using python’s webbrowser module, and therefore almost any other module opening external links, would use Firefox or Opera (depending on which was available).
# Checking python invocation of a browser import webbrowser as w w.get().open('http://mutaku.com')
Here’s the culprit, check in your /etc/alternatives/ directory and you’ll see what I mean.
ls -l /etc/alternatives/
Notice the entry x-www-browser. This will be a symlink to a browser and this value was different than what I was attempting to set through the XFCE4 GUI configuration. This problem seems somewhat common as I’ve seen it occur in KDE and GNOME as well.
To fix this issue, simply run the following command and you should be presented with a list of browsers from which you can set.
# Update your browser choice and choose from the presented text menu sudo update-alternatives --verbose --config x-www-browser # Now make sure teh proper symlink is setup ls -l /etc/alternatives/x-www-browser
Now you should have a functional default choice. Those GUIs can suck it!