PDA

View Full Version : Support Adobe Flash (shell script)


soko1
November 18th, 2008, 08:04
Hi all!

flashpluginctl:


#!/bin/sh

#(c) 2008 Sokolov Alexey [TrueBSD Project] <sokolov@truebsd.org>

check_file()
{
if [ ! -f $1 ]; then
echo "file $1 not found. Please install port '$2'"
exit
fi
}

usage_func() {
echo "usage: flashpluginctl [on | off]"
exit
}

check_file "/usr/local/lib/npapi/linux-flashplugin/libflashplayer.so" "www/linux-flashplugin9"
check_file "/usr/local/bin/nspluginwrapper" "www/nspluginwrapper"

if [ $# -ne 1 ]; then
usage_func
fi

if test "$1" != "on" -a "$1" != "off"; then
usage_func
fi

case $1 in
on )
linux_module=`kldstat | grep linux | awk '{print $5}'`
if [ "$linux_module" != "linux.ko" ]; then
if [ `whoami` != "root" ]; then
echo "I need root permission for load linux kernel module!"
echo "Please perform 'kldload linux' under an root."
exit
fi
kldload linux
fi
nspluginwrapper -a -r
nspluginwrapper -a -i
printf "\nFlash Plugin for user '`whoami`' enabled\n\n"
;;

off )
nspluginwrapper -a -r
printf "\nFlash Plugin for user '`whoami`' disabled\n\n"
;;
esac


Use:

%flashpluginctl on

Flash Plugin for user 'tuser' enabled


%flashpluginctl off

Flash Plugin for user 'tuser' disabled

paulfrottawa
December 1st, 2008, 19:23
How do you make use of such script?

I don't know much about scripts.

marius
December 1st, 2008, 23:53
Take a text editor, make a new file called flashpluginctl, and put all the text (the script) in that file, then save. Make the file executable by using "chmod +x flashpluginctl"

Place the file wherever you like, maybe in /usr/local/bin and run the script by typing the files name, now it acts like a command:

flashpluginctl on

fernando
December 3rd, 2008, 15:35
See also Flash 9 in native Firefox 3. (http://crnl.org/blog/2008/11/01/flash-9-for-freebsd-71)

paulfrottawa
December 26th, 2008, 08:18
Thanks I'm going to try 7.1

___________________________________

by the way I'm glad Adobe has finally done something. Not only did I sign the petition but I also wrote every broadcaster that I couldn't see there media when I couldn't. So I was asking them to use another media (player).

Slesarev
June 3rd, 2009, 00:46
Hey, I've installed all this stuff, but firefox3 (well, as other browsers do) shows just black rectangles instead of all flash frames. What could be wrong? I just have no idea of how to fix it...

jb_fvwm2
June 3rd, 2009, 03:06
I do not know, but ( seamonkey AND gnash ) = youtube flash
at least here ( _7 stable)