Flash files (.swf) prompts for download instead of opening

Solution 1:

These two links might help:

  • SWF file weirdness
  • Can't open local .swf in any browser

Apparently, the problem is with the MIME type used by the browser to open the files. The workaround to resolve this is to edit the /usr/share/mime/packages/freedesktop.org.xml file from:

<mime-type type="application/vnd.adobe.flash.movie">

to:

<mime-type type="application/x-shockwave-flash">

and then run:

sudo update-mime-database /usr/share/mime

Some users needed to reinstall the flash player and/or restart their browser as well.

Solution 2:

The mime fix used to work for me -- but on a fresh install of Ubuntu 16.04.1 and Chrome 60, it didn't work anymore. So after I tried that and did more googling, I found a note about Chrome's new "Flash sunset" / ask before running settings. In short, go to:

chrome://settings/content/flash?search=flash

And ensure that:

  • "Allow sites to run flash" is on
  • "Ask first" is off

If you're accessing localhost or 127.0.0.1, you might also enter those in the Allow sites list.

Worked for me -- good luck!