Instalação e desinstalação do Flash Player

Publicado por Felipe Ruiz Peixoto (última atualização em 14/07/2015)

[ Hits: 2.413 ]

Homepage: https://www.ubuntu.com/

Download install_flash_11_targz.sh




Olá pessoal, a instalação do Flash Player é até fácil, mas eu sou preguiçoso e gosto de tudo automatizado por scripts. Por isso eu criei este script que ajuda na instalação e desinstalação do Flash Player no seu browser.

No momento ele só funciona com o Mozilla Firefox, mas eu escrevi este script de forma que facilita a implementação de outros browsers.

  



Esconder código-fonte

#!/bin/bash
#
# install_flash_11_targz.sh
# Felipe Ruiz <feliperuiz.sax.eletronic@gmail.com>

#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.
#


if [ "`id -u`" -eq 0 ]
then
    echo 'This script will install (or uninstall) flash player 11 in your'
    echo browser. Please select your option:
    echo '1 -> Install in Firefox'
    echo '2 -> Install in Firefox .tar.gz'
    echo '3 -> Uninstall in Firefox'
    echo '4 -> Uninstall in Firefox .tar.gz'
    read browser
    case "$browser" in
        # Installing in Firefox
        1 )
        clear
        echo '                  Installing libflashplayer.so  [0%]'
        echo Download the firefox .tar.gz package at https://www.mozilla.org/
        echo and extract the package in your computer. Then insert the
        echo 'location (full path) of the firefox folder here:'
        read firefoxfolder
        clear
        echo '                  Installing libflashplayer.so  [33%]'
        echo Download the flash player .tar.gz package at
        echo 'http://get.adobe.com/flashplayer/completion/?installer=Flash_Player_10.2_for_Linux_%28.tar.gz%29'
        echo and extract the package in your computer. Then insert the
        echo 'location (full path) of the file "libflashplayer.so" here:'
        read libflashplayer
        clear
        echo '                  Installing libflashplayer.so  [66%]'
        mv $libflashplayer /usr/lib/mozilla/plugins
        clear
        echo '                  Installing libflashplayer.so  [100%]'
        echo 'Installed, press [Return] to exit'
        read nothing
        ;;
        # Installing in Firefox folders from .tar.gz package
        2 )
        clear
        echo '                  Installing libflashplayer.so  [0%]'
        echo Download the firefox .tar.gz package at https://www.mozilla.org/
        echo and extract the package in your computer. Then insert the
        echo 'location (full path) of the firefox folder here:'
        read firefoxfolder
        clear
        echo '                  Installing libflashplayer.so  [20%]'
        echo Download the flash player .tar.gz package at
        echo 'http://get.adobe.com/flashplayer/completion/?installer=Flash_Player_10.2_for_Linux_%28.tar.gz%29'
        echo and extract the package in your computer. Then insert the
        echo 'location (full path) of the file "libflashplayer.so" here:'
        read libflashplayer
        clear
        echo '                  Installing libflashplayer.so  [40%]'
        cp $libflashplayer $firefoxfolder
        clear
        echo '                  Installing libflashplayer.so  [60%]'
        cp $libflashplayer /usr/lib/mozilla/plugins
        clear
        echo '                  Installing libflashplayer.so  [80%]'
        mv $libflashplayer $firefoxfolder'/components'
        clear
        echo '                  Installing libflashplayer.so  [100%]'
        echo 'Installed, press [Return] to exit'
        read nothing
        ;;
        # Uninstalling from Firefox
        3 )
        clear
        echo '                  Uninstalling libflashplayer.so  [0%]'
        echo 'Are you sure about uninstalling flash player? [Y or N]'
        read answer
        if [ "$answer" == 'Y' ]
        then
            clear
            echo '                  Uninstalling libflashplayer.so  [50%]'
            rm '/usr/lib/mozilla/plugins/libflashplayer.so'
            clear
            echo '                  Uninstalling libflashplayer.so  [100%]'
            echo 'Uninstalled.'
        fi
        echo 'Press [Return] to exit'
        read nothing
        ;;
        # Uninstalling from firefox folders from .tar.gz package
        4 )
        clear
        echo '                  Uninstalling libflashplayer.so  [0%]'
        echo 'Are you sure about uninstalling flash player? [Y or N]'
        read answer
        if [ "$answer" == 'Y' ]
        then
            clear
            echo '                  Uninstalling libflashplayer.so  [20%]'
            echo 'Insert the location (full path) of the firefox folder here:'
            read firefoxfolder
            clear
            echo '                  Uninstalling libflashplayer.so  [40%]'
            rm $firefoxfolder'/libflashplayer.so'
            clear
            echo '                  Uninstalling libflashplayer.so  [60%]'
            rm /usr/lib/mozilla/plugins/libflashplayer.so
            clear
            echo '                  Uninstalling libflashplayer.so  [80%]'
            rm $firefoxfolder'/components/libflashplayer.so'
            clear
            echo '                  Uninstalling libflashplayer.so  [100%]'
            echo 'Uninstalled.'
        fi
        echo 'Press [Return] to exit'
        read nothing
        ;;
        * )
        echo Invalid option
        ;;
    esac
else
    echo "This script needs superuser permissions, please input your password:"
    su -c "./install_flash_11_targz.sh"
fi

Scripts recomendados

createThumbs

Configurar usuarios samba na boa sem dor de cabeça em modo texto

Escrever por extenso

Envia mensagens para o serviço mensageiro do windows facilmente

Limpeza de logs sem dor de cabeça


  

Comentários
[1] Comentário enviado por wagnerfs em 15/07/2015 - 22:58h

Ainda bem que o HTML5 está tomando o espaço do flash até por conta das novas ocorrências em falhas da segurança neste plugin. Mas infelizmente ainda tem muitos sites que usam esse plugin e o seu script vai ser uma mão na roda para a instalação desse bendito. :)
_________________________
Wagner F. de Souza
Técnico/Instrutor de Informática
"GNU/Linux for human beings."
LPI ID: LPI000297782


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts