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

14

8

I used to be able to drag .swf files into Chromium, and they would play just fine.

Recently, that stopped working. Doesn't work in Chromium or Iceweasel. Both browsers instead prompt to download the .swf file. Both have Flash Player enabled, and the .swf MIME-type listed on their plugins pages. I tried drag-and-drop and Ctrl+O, neither work. Is there something I can change to get the browsers to recognize the MIME-type?

Using Chromium 32 and Iceweasel 24 on Debian Jessie.

soren121

Posted 2014-03-09T19:34:10.503

Reputation: 297

Answers

22

These two links might help:

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.

jimm-cl

Posted 2014-03-09T19:34:10.503

Reputation: 1 469

1Wow, that worked! Thanks! I'm glad I happened to wander back on to Super User and find this. – soren121 – 2014-08-02T03:04:42.843

1Worked for Ubuntu 14.04 with google-chrome 40.0 - thanks! – Jeff Ward – 2015-03-04T15:34:06.193

1Worked with Ubuntu 14.04, and fixed both chrome 46.02.2490.86, and Firefox 42.0 – Juan Carlos Muñoz – 2015-12-01T16:24:37.950

2No need to restart Google Chrome afterwards. – pts – 2016-01-25T09:35:46.217

2

Heh glad to see my fix from the arch forums is helping people this much, sad to see this hasn't been actually fixed over at chromium yet (I created a bug report almost 2 bloody years ago! and this is NOT hard to fix...) https://bugs.chromium.org/p/chromium/issues/detail?id=369015

– Cestarian – 2016-02-21T01:11:33.353

1Also edited in a script to automate this process, enjoy. (saves backup of the original file, although this is not necessary since the original file can be retrieved by reinstalling the shared-mime-info package) – Cestarian – 2016-02-21T01:30:40.507

1Worked with Linux Mint 17.3 with google-chrome 52.0.2743.116, chromium 51.0.2704.79, Firefox 48.0. – Paolo Gibellini – 2016-08-09T22:57:11.733

On Ubuntu 16.04 I actually had to restart Chrome to get it to work. – ashes999 – 2016-10-21T21:20:24.757

1Also worked on Fedora 24, Chrome 55. No restart required. – Raman – 2016-11-22T21:25:06.637

1

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!

Jeff Ward

Posted 2014-03-09T19:34:10.503

Reputation: 438

0

Ok, it's 2019, and I'm using Ubuntu 18.04.2 and Chrome 73+, aaaand the other fixes are not working. :(

So, another possible workaround is to create a simple .html file that loads your .swf file.

For example, if I have test.swf in a directory, and I create test.html in the same directory, containing:

<!DOCTYPE>
<html>
  <body style="width:100%;height:100%">
    <object width="100%" height="100%" data="./test.swf"></object>
  </body>
</html>

Then load the .html file in Chrome, and it asks if I want to play the file (see screenshot), and then it plays the swf:

Chrome Flash Allow Dialog

Jeff Ward

Posted 2014-03-09T19:34:10.503

Reputation: 438