# Support Adobe Flash (shell script)



## soko1 (Nov 18, 2008)

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 (Dec 1, 2008)

How do you make use of such script?

I don't know much about scripts.


----------



## marius (Dec 1, 2008)

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 (Dec 3, 2008)

See also Flash 9 in native Firefox 3.


----------



## paulfrottawa (Dec 26, 2008)

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 (Jun 2, 2009)

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 (Jun 3, 2009)

I do not know, but ( seamonkey AND gnash ) = youtube flash
at least here ( _7 stable)


----------



## jaymax (Sep 11, 2012)

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


----------



## SirDice (Sep 11, 2012)

This "solution" is three years old. The flash plugin referenced here doesn't even exist anymore.

Update your ports tree, firefox is at 15.0.1 and Flash is at version 11.

www/firefox
www/linux-f10-flashplugin11


----------



## numpad5 (Sep 11, 2012)

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.


----------

