First of all, the codesnippet needs a few adjustments:
if [[ $3 ]]; then
raw="$(mktemp)"
dump-gnash $2 -P "FlashVars=url=file://$1" -D "$raw" --max-advances 1 -j 500 -k 500
tail -c 1MB "$raw" | convert -size 500x500 -depth 8 rgba:- -separate -swap 0,2 -combine -trim png:"$3"
trap "rm $raw" EXIT
else
echo "Insufficient arguments (expected 3 arguments)"
exit 1
fi
Then, the commands to register the swf handler:
gconftool-2 -s "/desktop/gnome/thumbnailers/application@swf" -t string "/usr/bin/swfthumbnailer.sh %s %i %o"
gconftool-2 -s "/desktop/gnome/thumbnailers/application@swf/enable" -t boolean 'true'
gconftool-2 -s "/desktop/gnome/thumbnailers/application@x-swf" -t string "/usr/bin/swfthumbnailer.sh %s %i %o"
gconftool-2 -s "/desktop/gnome/thumbnailers/application@x-swf/enable" -t boolean 'true'
gconftool-2 -s "/desktop/gnome/thumbnailers/application@x-shockwave-flash/command" -t string "/usr/bin/swfthumbnailer.sh %s %i %o"
gconftool-2 -s "/desktop/gnome/thumbnailers/application@x-shockwave-flash/enable" -t boolean 'true'