Lưu lại file với đuôi sh. Chọn excute.
Vô lại terminal ./script.sh
#!/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
Vô lại terminal ./script.sh
#!/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
0 Nhận xét