Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm looking for a .swf player that would reload an already opened file if its content changed. Alternatively one that would work in one-instance only way so when I call it again with a new file I would have the desired effect. As in :

gnash first_file.swf
... 
gnash new_file.swf

ending up with only one window.

I have an overly complicated solution ready with a bash script checking the file size changes, killing old instance and reinitializng the program but I'm curious whether there is a more elegant solution.

share|improve this question

closed as off topic by Marco Ceppi Oct 18 '12 at 19:49

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Asked and answered on Stack Overflow –  Marco Ceppi Oct 18 '12 at 19:50

1 Answer 1

My solution is

sudo apt-get install incron
echo "my_username" | sudo tee -a /etc/incron.allow # allow my_username to run incron
incrontab -e

add the following to incrontab:

/home/my_username/path/myfile.swf IN_MODIFY /home/my_username/path/run.sh

and the run.sh contains

killall gtk-gnash
gtk-gnash /home/my_username/path/myfile.swf

Does the job, I hope this helps someone in at least indirect way. Incron is a very powerful tool.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.