Ubuntu – Why can’t Firefox run local .swf files


My goal is trying to run .swf files through Firefox and NOT a standalone player.

When trying to run local .swf files on Firefox 29.0 (currently on 14.04), the browser opens the Open With/Save File prompt window even if the browser has the Flash plugin installed. Right-clicking on the file and clicking Open With… > Firefox just makes the browser open a new tab and then the prompt to Open With/Save File again. Selecting Firefox through that prompt window will still just make Firefox open the prompt again on a new tab.

When accessing .swf files online, though, they run normally and Firefox even shows the Lego-looking plugin indicator in the address bar saying that "Adobe Flash" is enabled for the address I'm accessing the .swf from.

In Firefox's preferences' Applications tab, SWF Files are currently set to "Use Shockwave Flash (in Firefox)", so I don't get why it won't do what it says for the case of local files.

Apparently, Firefox has separate "Shockwave Flash File" entries in the Applications tab of its Preferences for different mime-types. Found a workaround which I entered below.

Best Answer

Another option is to create ~/.mime.types in the home directory with following content:

application/x-shockwave-flash       swf swfl

This way it will not get overwritten on system upgrade.

If you want you can copy, paste and run this command to do this:

echo 'application/x-shockwave-flash       swf swfl' >> .mime.types

No further commands necessary, not even a browser restart.

Related Question