Clicking a link to load a pdf file can bring up a dialog asking whether to save the file or open it with a particular program.
The last option under the "Open With" dropdown is "Other...". If you click on "Other...", the "Choose Helper Application" dialog shows recommended programs with an option to "View all Applications".
If the list of applications is hosed, the recommended procedure is to remove / rename mimeTypes.rdb (some mention is also made about removing handlers.json) and then restarting. Removing both of these files had no effect.
Upon restart, no new mimeTypes.rdf was created. A new handlers.json was created with many fewer entries, but the "View all Applications" dialog still had the same trash in it.
In my case, not all applications were shown (in particular, xpdf was missing), and some are shown multiple times with differing labels or the same label. Many applications are shown which are not listed in the set of helper applications shown in Preferences/General and are not even on this machine.
I have no idea where the list of applications is coming from; clearly not the applications in the firefox preferences. It looks / feels like it is being retrieved from a firefox database or some other process.
When all else fails, the recommended procedure is to "Reset Firefox".
Attempting to do a reset caused firefox to crash and then start again; there was a .core file with the right timestamp in the home directory. The profile had been moved to a newly created ~/Desktop directory under the name "Old Firefox Data".
When firefox restarted, it had a new profile with restored user data.
There was no mimeTypes.rdf file; there was a new handlers.json.
The set of helper applications in preferences was minimal:
rc, ircs, mailto, Podcast, PDF, Video Podcast, Web Feed, and webcal
I don't know if this is the proper set or not.
In any case, going to a site with a pdf and trying to choose a different application still shows the old set of garbled stuff.
A web site which worked to trigger this for me was:
Go to the bottom of the page and click on "2018 PROXY STATEMENT"
but any pdf load will probably work if preferences say to ask.
I am running Xfce4; the dialog contains things like:
"A Wine application" (don't have wine anymore, did long ago)
"Create Launcher on the panel"
"Firefox Web Browser"
"GLiv Image Viewer" (twice)
"Microsoft Access for Windows" (a boatload of them; not on this machine)
"Microsoft Excel for Windows" (a boatload of them; not on this machine)
My ports were completely rebuilt in a consistent manner about a week ago.
10.3-RELEASE-p24 FreeBSD 10.3-RELEASE-p24 #0: Wed Nov 15 04:57:40 UTC 2017 firstname.lastname@example.org:/usr/obj/usr/src/s
The garbage in the Application Menu is apparently retrieved from some desktop information; editing
and removing bogus entries gets rid of *some* of them.
However, there's nothing I've found that says that's what's supposed to happen or how to disable it.
The entries are also coming from someplace else, as I see two entries for gliv and it is not in mimeapps.list or handlers.json
BTW this is on ff 59.0
The remaining trash in the menu was due to global /usr/local/share/applications having some problems -- a duplicate entry installed by gliv (gliv.desktop and gnome-gliv.desktop); can't remember what else.
So fundamentally what's broken is:
1. The notion that you can mess with files in the firefox profile to clear
up the application menu.
2. The set of potential applications displayed when editing preferences is not the full set used when downloading a file.
3. It crashed when trying to reset.
FreeBSD 10.3 is gone, we have Firefox version 72. Close here with overcome by events.
If there are still problems, please reopen.