12:37 AM

Installing mp3 puling gstreamer and vlc on fedora

The fedora repository does not provide many software's which are provided in rpmfusion repo. The rpm fusion contains many popular packages like vlc and gstreamer (mp3 plugin for rhythmbox etc)
The following shell script configures rpmfusion on fedora and installs your favorite softwares........


#!/bin/sh

#program on fedora to install gstreamer vlc
#these packages are in rpm fusion repostiory

no_of_argmnt=1;

#checks wether the user is root or not
if (( $EUID != 0 ))
then
    echo "the script must be runed as root"
    echo "try again as"
    echo "su -c \`sh $0.sh \"package\"\`"
    echo "package can be gstreamer or vlc "
    exit 1
fi

#checks for the parameters
if (( $no_of_argmnt != $#))
then
    echo "parametes missing"
    echo "scrpit usage::"
    echo "su -c \`sh $#.sh \"package\"\`"
    echo "package can ve gstreamer or vlc "
    exit 1
fi

echo "Configuring Rpm fusion...."
echo "Getting rpm fusion package from http://download1.rpmfusion.org"
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

if [ $1 == "vlc" ]
then
    echo "Installing vlc..."
    yum install vlc
elif [ $1 == "gstreamer" ]
then
    echo "Installing gstreamer..."
    yum install gstreamer-{ffmpeg,plugins-{good,ugly,bad{,-free,-nonfree}}}
else
    echo "Unknown package"
fi

echo "Finishing installation.."
exit 0
    

7:37 AM

Script to install flash plugin



A simple bash script to install flash for mozilla and/or chromium browser on any linux system.

sript usage:

To install for fedora use
    sh installflash.sh mozilla

To install for chromuin use
    sh installflash.sh chromium

For both use
    sh installflash.sh mozilla chromium

IMPORTANT :: the script must be excecuted as root

####################################################

#!/bin/sh


if [ -z $1 ]
    then
    echo "Arguements missings"
    echo
    echo "To install for fedora use"
    echo "    sh installflash.sh mozilla"
    echo
    echo "To install for chromuin use"
    echo "    sh installflash.sh chromium"
    echo
    echo "For both use "
    echo "    sh installflash.sh mozilla chromium"
    echo   
    exit 1
fi

if (( $EUID != 0 ))
     then
     echo "This scritp must be run as root"
     exit 1
fi
echo "Downloading flash files from adobe"
mkdir temp
cd temp

wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.236/install_flash_player_11_linux.x86_64.tar.gz
tar -xvf install_flash_player_11_linux.x86_64.tar.gz

if [ -n $2 ]
    then
    echo "installing flash for mozilla"
    mv libflashplayer.so /usr/lib64/mozilla/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/mozilla/plugins/       
    fi
    echo "installing flash for chromium"
    mv libflashplayer.so /usr/lib64/chromium-browser/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/chromium-browser/plugins/       
    fi
   
fi
if [ $1 = "mozilla" ]
    then
    echo "installing flash for mozilla"
    mv libflashplayer.so /usr/lib64/mozilla/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/mozilla/plugins/       
    fi
fi

if [ $1 = "chromium" ]
    then
    echo "installing flash for chromium"
    mv libflashplayer.so /usr/lib64/chromium-browser/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/chromium-browser/plugins/       
    fi
fi

rm -rf temp/
rmdir temp

###################################################