Updated version of the flash64.sh script for Ubuntu 7.10 Gutsy Gibbon
A few months ago I released a script to install a 32-bit Adobe Flash plugin to a 64-bit Firefox, but it doesn't seem to work in Gutsy beta. Here's an updated one. I upgraded my laptop to Gutsy and used this one to get Flash working.
Edit: I did a complete reinstall later and learned that Gutsy knows how to set this up by itself. So there's no need for this script anymore. And that is a very positive thing!
Just cut and paste it to "flash64.sh", add execute permissions, and run it with sudo.
#!/bin/sh
DEPS="ia32-libs ia32-libs-gtk util-linux lib32asound2 alien"
GWENOLE=http://gwenole.beauchesne.info/projects/nspluginwrapper/files
PLUGIN=nspluginwrapper-0.9.91.4-1.x86_64.rpm
VIEWER=nspluginwrapper-i386-0.9.91.4-1.x86_64.rpm
MACROMEDIA=http://fpdownload.macromedia.com/get/flashplayer/current
FLASH=install_flash_player_9_linux.tar.gz
usage() {
cat << EOF
A script to install 32-bit Adobe Flash plugin in a 64-bit Firefox.
Usage: $0 [-k]
-k keep temporary files
EOF
}
while getopts "kh?" OPT
do
case $OPT in
"k") KEEPTMP=1;;
"h"|"?"|"help") usage; exit;;
*) echo Unrecognized option "$OPT"; usage; exit;;
esac
done
if [ "`id -u`" != "0" ]
then
echo You must be root in order to run this script.
echo Try: "sudo $0" instead.
echo For options and help, use "$0 -h".
exit 1
fi
TMP=`mktemp -d`
cd $TMP
echo Temporary directory $TMP created
echo Installing dependencies: $DEPS
apt-get -qq install $DEPS || exit 1
echo Getting nspluginwrapper plugin: $PLUGIN
wget -qc $GWENOLE/$PLUGIN
echo Getting nspluginwrapper viewer: $VIEWER
wget -qc $GWENOLE/$VIEWER
echo Installing plugin
alien -i $PLUGIN
echo Installing viewer
alien -i $VIEWER
echo Getting Flash plugin: $PLUGIN
wget -qc $MACROMEDIA/$FLASH
echo Installing Flash plugin to /usr/lib32/mozilla/plugins
mkdir -p /usr/lib32/mozilla/plugins
tar -Ozxf $FLASH install_flash_player_9_linux/flashplayer.xpt > /usr/lib32/mozilla/plugins/flashplayer.xpt
tar -Ozxf $FLASH install_flash_player_9_linux/libflashplayer.so > /usr/lib32/mozilla/plugins/libflashplayer.so
echo Creating a wrapper using nspluginwrapper
nspluginwrapper -i /usr/lib32/mozilla/plugins/libflashplayer.so
if [ "$KEEPTMP" = "1" ]
then
echo Temporary files were left in: $TMP
else
echo Removing temporary files
rm -rf $TMP
fi
echo
echo The Flash plugin and wrapper have been installed.
echo You must restart Firefox.