-it installs google-chrome
-grabs 2 files out of google-chrome (libpepflashplayer.so and manifest.json), and copies them to /usr/lib/PepperFlash/
-removes google-chrome
-grabs PEPPER_FLASH_VERSION from /usr/lib/PepperFlash/manifest.json
-adds startup arguments to /etc/chromium/default to start chromium with pepperflash
-tells the user to go to chrome://plugins in Chromium to check the current version and tick the 'always allowed' box if they want.
It is possible to have a folder named keepfiles and store google-chrome-stable_current_amd64.deb in it (so the script wont need to download it).
Save 'Complete Script' as installchromiumflash.sh, then add execution rights like this:
Code: Select all
chmod +x installchromiumflash.sh
Code: Select all
./installchromiumflash.sh
Code: Select all
bash installchromiumflash.sh
Code: Select all
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "Must be root user to run this script"
exit 1
fi
apt-get update
apt-get -y install chromium-browser
if [ ! -d /usr/lib/PepperFlash ]
then
mkdir /usr/lib/PepperFlash
fi
if [ ! -f /tmp/google-chrome-stable_current_amd64.deb ] && [ -d keepfiles ] && [ -f keepfiles/google-chrome-stable_current_amd64.deb ];
then
cp keepfiles/google-chrome-stable_current_amd64.deb /tmp
fi
if [ ! -f /usr/lib/PepperFlash/libpepflashplayer.so ] || [ ! -f /usr/lib/PepperFlash/manifest.json ]
then
if [ ! -f google-chrome-stable_current_amd64.deb ]
then
wget -O /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
fi
apt-get -y install libcurl3
dpkg -i /tmp/google-chrome-stable_current_amd64.deb
cp /opt/google/chrome/PepperFlash/libpepflashplayer.so /usr/lib/PepperFlash/libpepflashplayer.so
cp /opt/google/chrome/PepperFlash/manifest.json /usr/lib/PepperFlash/manifest.json
apt-get -y remove google-chrome-stable
fi
PEPPER_FLASH_VERSION=$(grep '"version":' /usr/lib/PepperFlash/manifest.json| grep -Po '(?<=version": ")(?:\d|\.)*')
echo 'CHROMIUM_FLAGS="--password-store=detect --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version='$PEPPER_FLASH_VERSION'"' > /etc/chromium/default
echo
echo '(Re)start Chromium'
echo 'Check chrome://plugins/ now says: flash '$PEPPER_FLASH_VERSION
echo 'And tick "Always allowed", perhaps?'
echo
Code: Select all
apt-get remove libcurl3