The GNOME Control Center allows me to select a web browser under Details » Default Applications. However, only browsers installed via the package manager can be selected there. How can I specify an arbitrary executable to be run whenever a GNOME application wants to start a web browser?
The background of my question is that every time I click on a link in some GNOME application I want to select in which of my different Firefox profiles the respective web page is opened. Firefox doesn’t support this; it only allows you to select a profile when no Firefox instances are already running. Therefore I’ve written a small wrapper script that provides this feature, and I want GNOME applications to run this wrapper script instead of running Firefox directly.
I’m using Ubuntu GNOME 16.04.