Comment 3 for bug 275410

Revision history for this message
Steve Langasek (vorlon) wrote : Re: sensible-browser not working

This is caused by a bug in the /usr/lib/firefox-3.0.3/firefox.sh wrapper script; it assumes that 'basename $0' is always a valid binary name under /usr/lib/firefox-3.0.3, which is not at all guaranteed to be the case; e.g., firefox-3.0, abrowser-3.0, gnome-www-browser, and x-www-browser all are (or can be) symlinks to this wrapper script, but none of these appear as program names in /usr/lib/firefox-3.0.3.

I think the best solution here is to use readlink on $0 recursively until a matching name is found; this avoids having to hard-code any lists of known alternatives, or lists of known brandings.