Support Adobe Flash (shell script)

Hi all!

flashpluginctl:

Code:
#!/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
Code:
Flash Plugin for user 'tuser' enabled

%flashpluginctl off
Code:
Flash Plugin for user 'tuser' disabled
 
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
 
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).
 
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...
 
FreeBSD 9.0-RELEASE #0:
firefox 9.01

Tried almost everything ?

Might be a bit stale but tried it nevertheless

Got

:> flashpluginctl on
file /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so not found. Please install port 'www/linux-flashplugin9'

# pkg_add -r linux-flashplugin9
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/Latest/linux-flashplugin9.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/Latest/linux-flashplugin9.tbz' by URL


make install etc => unfetchable


How do people install flash plugins on firefox 9.01
 
The linux flashplugin doesn't always work for me under the compat layer in BSD.

Even when I have followed directions perfectly it can give system errors.

Also, last time I went to download the official flash Adobe site said flash 11 would be the last flash for linux.

I think they are integrating lots of 3d stuff for gaming and just don't want the hassle of supporting video acceleration troubles on open source OS clients' hardware.

My solution I have found works well I always tell people is to run windows flash through opera browser in wine. It is very simple to install and works great.
 
Back
Top