matt@entropy:~$ cat bin/fplay #!/bin/bash pid=$(pgrep -f libflashplayer.so) if test -z "$pid"; then echo "flash plugin not running" | tee /dev/stderr > /dev/null exit 1 fi files= for i in /proc/$pid/fd/*; do if readlink $i | grep -q ^/tmp/Flash; then files="$files $i" fi done exec mplayer -fs "$@" $files matt@entropy:~$ cat bin/fcopy #!/bin/bash pid=$(pgrep -f libflashplayer.so) if test -z "$pid"; then echo "flash plugin not running" | tee /dev/stderr >/dev/null exit 1 fi if test $# != 2; then echo "usage: $0 src-fd dest-file" | tee /dev/stderr >/dev/null exit 1 fi src=/proc/$pid/fd/$1 dest=$2 exec cp "$src" "$dest"