54

Does anyone know what libraries I have to install to play .swf files?

0

11 Answers 11

30

Sorry, that didn't post right.

Edit /usr/share/mime/packages/freedesktop.org.xml file and change

<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

and then reinstall flash player.

7
  • 2
    The real solution to play swf (shockwave flash) files in browsers while they just save or ask to save local swf files. (Pushing some keywords here.) Commented Sep 10, 2014 at 23:33
  • 6
    No need to reinstall flash player here. After updating mime database it works. Commented Sep 10, 2014 at 23:35
  • this works like a charm.. Commented Dec 29, 2014 at 11:13
  • askubuntu.com/questions/478169/… Commented Apr 11, 2016 at 14:01
  • 1
    Tested on Ubuntu 16.04 + Chrome. It works. Thanks a lot!
    – jap1968
    Commented May 9, 2016 at 11:22
30

.swf files can be opened with gnash swf viewer. If you don't have it:

sudo apt-get install gnash
3
26

You can use the standalone flashplayer by Adobe : https://help.ubuntu.com/community/FlashPlayerStandalone

But you can also open the file in your Internet browser if you have installed flash plugin.

5
  • 1
    Ok, I guess I had some sort of configuration problem. When I tried to install the flash plug-in into my browser it said it was already installed, but I still couldn't play the videos. An uninstall/reinstall fixed my problem.
    – jumpnett
    Commented Oct 14, 2010 at 18:27
  • It did not work when I tried to open my swf on chrome. Commented Sep 10, 2017 at 14:43
  • If Googlers don't want to do this accepted answer, check out this one: askubuntu.com/a/467892/374783 Commented Feb 18, 2018 at 18:56
  • @Anderson, as far as I can tell your link no longer offers a download nor does the one in the answer.
    – Kvothe
    Commented Dec 26, 2023 at 18:29
  • Please ignore today answers that were written more than a decade ago. There is very little chance that they are still relevant. I think StackOverflow should just archive this stuff. Commented Jan 11 at 15:01
3

What worked for me is going to the adobe site and then selecting

Download the Flash Player Projector (64-bit)

Then extract the contents,inside the extracted folder there is a file called flashplayer open it. Then CTRL+O to open the file locally isntead of typing it as a url.

1
  • The download link is broken, showing an end-of-life page. But the site link works, and I could still download the player projector from there.
    – Raslanove
    Commented Oct 16, 2021 at 18:35
2

Just found worked solution to play flash with firefox from ubuntuforums

Here are steps in resume:

Create file ~/.mime.types with content:

application/x-shockwave-flash       swf swfl

Disable setting plugins.http_https_only (make it equal to false) in firefox by typing: about:config in URL box and finding this setting with Ctrl+f.

Now you can open .swf file from file manager by Open With Firefox. Or open it from firefox with Ctrl+o.

PS. you'll need to accept the warning about accept the risk and restart firefox once setting is set to false.

1

How to open a .swf-file with Firefox browser

Right-click on the file. Choose Properties > Open With, then click on show other applications. Now you can add firefox in the list. Set it as default. Now double-click on the .swf-file.

It will open in the Firefox and play itself. I assume the flashplayer-plugin is already installed in Firefox, else it will ask you to install flashplayer-plugin. Follow the steps and you are good to go.

1
  • 8
    This answer does not work in the latest version of Firefox.
    – Riking
    Commented Nov 28, 2017 at 8:02
0

Another solution if you do not want to open it in web browser is you can install shockwave player for windows in Ubuntu via wine. I installed it and it's work fine.

0

Install swfdec-gnome

sudo apt-get install swfdec-gnome

Use latest Google Chrome (which has inbuilt flash support)

1
0

In order to locally open .swf file with more recent Firefox versions (78+), old methods wouldn't work, e. g. changing/replacing entries of application/vnd.adobe.flash.movie with appropriate entries for application/x-shockwave-flash (or creating the latter, where the former was missing).

Tried modifications:

  • installing flashplayer-mozilla package

  • in FF' about:config, setting plugins.http_https_only to false

  • in FF' Shockwave Flash plugin's settings, enabling alays ask

  • applying the above in FF' profile folder's 'mimeTypes.rdf'

  • creating file ~/.mime.types with entry:

    application/x-shockwave-flash swf swfl

  • replacing vnd.adobe.flash.movie with that entry in /etc/mime.types

  • replacing/adding an appropriate entry for <mime-type type="application/x-shockwave-flash"> to /usr/share/mime/packages/freedesktop.org.xml

  • executing mandatory update-mime-database /usr/share/mime

So, even with xdg-mime query default application/... pointing to Firefox' corresponding .desktop starter configuration file, for both mime types, and FF correctly showing a choice to execute '*.swf' with Flash Player, it failed.

SOLUTION:

As it turned out, the following steps were required, to finally be able to execute local .swf files in Firefox (with some of the above maybe still required beforehand):

  1. Replace following entry in FF profile folder's file handlers.json (mind replacing exactly between the correct 2 commata!)

    application/vnd.adobe.flash.movie

    with

    "application/x-shockwave-flash":{"action":2,"handlers":[{"name":"flashplayer","path":"/usr/lib/flashplayer-mozilla/libflashplayer.so"}],"extensions":["swf"],"ask":true}

  2. Re-install flashplayer-mozilla package

  3. Disconnect from the network (!)

  4. Temporarily reset the desktop's system date, back to before the official EoL date (< December 31, 2020) of FlashPlayer, or else it will attempt redirecting to Adobe's EoL website (!)

  5. Now finally 'enjoy' playing your favorite local SWF / FlashPlayer files!

  6. After finished, restore the original system date (!)

NOTE: There might be a problem with all add-on's disabled after a restart, if restoring the original system date before hasn't occured before (or while FF trying to update its components, unless disabled before).

To fix this, reset all of Firefox' registry entries, starting with app.update.lastUpdateTime*.

P.S.: It might be arguably a 'good idea', to store away a copy of the last version (32.0 r0 / 32.0.0.465) of Shockwave Flash player's binary from /usr/lib/flashplayer-mozilla/libflashplayer.so - you never know, it might vanish from the repositories someday. But then, Mozilla could also blacklist the plugin completely.

Also, if somehow it doesn't work out, you might check for the following registered mime type in the Shockwave Flash plugin's settings in FF: application/x-shockwave-flash (Shockwave Flash: swf)

And in about:preferences#general Applications, search for 'Flash'; it should show Flashplayer | always ask.

To execute a local .swf files, you'll have to click through several security warning popups (2-4), each time, especially, with NoScript.

ATTENTION: Due to the notorious security problems history with Flash Player, use this method at your own risk! It's generally a bad idea, and most especially, to download new .swf files from dubious websites and executing them. This method should be used with caution, and only if you 'know what you're doing' !

0

In 22.04 you can install Adobe Flash Player from the software center:

enter image description here

0

Apparently you need an old version of Adobe Flash Player (before they were self-sabotaged to stop working after a certain time).

It is available here: https://archive.org/details/flashplayer_32_sa_202104

Similarly you can use old versions of browser plugins to make flash work in a browsers. E.g.: https://archive.org/details/flashplayer_old

(Thank god for the archive.org)


Works on Dec 26 2023

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .