Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run SWF without a browser (on a linux server)?

Tags:

linux

flash

I have a swf file that connects to a remote flash server and receives some data. For security reasons I can't make this swf file web accessible so I can't use browser to run it. Is there a way to run it on the server side from a command prompt (under linux)?

like image 751
serg Avatar asked May 08 '09 03:05

serg


People also ask

How run SWF file in Linux?

The best solution that I find to play . swf files on Linux is run Adobe Flash Player Projector (download from here, a single . EXE file) and run it under wine.

Can VLC play SWF files?

Non interactive SWF content like SWF animations or video clips can be played on VLC. VLC automatically demuxes the SWF file to MP4 and plays it. However interactive SWF content like SWF game files or pretty much any SWF content wherein you can use your mouse or keyboard don't work with VLC.

How can I play SWF files online?

Small Web Format It is possible to open SWF files with Adobe Flash Player or with a browser that has the flash plugin installed.


2 Answers

You can use Xvfb or Xfake to run a X server that doesn't interface to real hardware. If they aren't available as packages for your distribution, you can build them from the Xorg xserver sources.

(Or use MarkR's Xvnc suggestion.)

The Adobe plugin used to ship with a stand-alone executable named flashplayer or gflashplayer, which was usable outside of the browser. I think it still exists, but is in the developer package, or something like that.

If you're using a free implementation of Flash, both Gnash and Swfdec come with stand-alone gnash and swfdec executables respectively.

This starts Xvfb on display :20 (just make sure to pick a number that's not in use; normal displays start at :0, ssh's X forwarding typically allocates :10 and up, and I've seen some Xvnc setups start at :90), and runs gnash inside of it:

startx /usr/bin/gnash http://url.to/flash.swf -- /usr/bin/Xvfb :20
like image 156
ephemient Avatar answered Oct 12 '22 09:10

ephemient


If you use ubuntu , type sudo apt-get install xvfb, and then download the flashplayer from adobe, and just try like this, it work well:

xvfb-run ./flashplayer test.swf

Or if you use windows, you can just double click the swf on the server, and it running now, communction with other server, just use this swf as part of server, calculate the value and return ,swf run loop for ever as it's a server

like image 22
3 revs, 2 users 82% Avatar answered Oct 12 '22 11:10

3 revs, 2 users 82%