Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [SCRIPT] Install flashplugin on demand from the internet

  1. #1
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297

    [SCRIPT] Install flashplugin on demand from the internet

    Just thought it would be better to post it here, than to have it in the other thread. Enjoy! Comments wanted:

    #
    # Install flash plugin - from website - is kept if configuration is saved!
    #
    # GPL
    #
    # Author: Fabian Franz <knx-flash@fabian-franz.de>

    cd /tmp
    wget http://macromedia.mplug.org/tarball/...er_6_linux.tar
    .gz
    tar xzf install_flash_player_6_linux.tar.gz
    cd install_flash_player_6_linux/
    mkdir -p /home/knoppix/.netscape/plugins/
    mkdir -p /home/knoppix/.mozilla/plugins/
    cp flashplayer.xpt libflashplayer.so /home/knoppix/.netscape/plugins/
    cp flashplayer.xpt libflashplayer.so /home/knoppix/.mozilla/plugins/
    cd ..
    #cleanup
    rm -rf install_flash_player_6_linux/
    rm -f install_flash_player_6_linux.tar.gz

    # scan for new plugins
    nspluginscan

    btw. it is also saved if you save your config to harddisk. So you will not need to install it again the next time you start with myconfig=scan or myconfig=/mnt...

    cu

    Fabian

  2. #2
    Senior Member registered user
    Join Date
    Nov 2002
    Posts
    1,353
    Fabian,

    It would be GREAT if Knopper would include this. It would be an easy way to add flash without haveing to worry about fitting more stuff on the CD.

    The Kurumin Knoppix based CD (in Portuguese) also does this. He posted his scipt for this here.

    Carlos' script does things a bit differently and he also uses phoenix.

  3. #3
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Yes, please send it to the Knoppix developer maining list.

    Btw, does this enable Flash also in Konqueror atomagically? (In Konqueror, you normally have to "search for new plugins" manually before it recognizes Mozilla plugins...)

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297
    Quote Originally Posted by probono
    Yes, please send it to the Knoppix developer maining list.

    Btw, does this enable Flash also in Konqueror atomagically? (In Konqueror, you normally have to "search for new plugins" manually before it recognizes Mozilla plugins...)
    Yes, this is done in the last step! (nspluginscan)

    I have already sent it to Klaus directly, but I think I'll have to make debian package out of it, before he accepts it ) [ debian-knoppix would be a good audience, too but I try to get it as fast as possible into the next release]

    cu

    Fabian

  5. #5
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297

    New version ...

    Below is new version, which includes command line parameters, using a local dir (e.g. floppy) and an fully interactive, mode with an 4-step wizard in english and german translation

    Enjoy!!!

    Code:
    #!/bin/bash
    # 
    # Install flash plugin - from website or from directory -
    #   (is kept if configuration is saved!)
    #
    # GPL
    #
    # Author: Fabian Franz <knx-flash@fabian-franz.de>
    
    # Constants
    
    VERSION="0.1";
    FLASH_PATH= # unset flash path
    FLASH_NAME="install_flash_player_6_linux.tar.gz"
    FLASH_DIR="install_flash_player_6_linux"
    FLASH_FILES="flashplayer.xpt libflashplayer.so"
    FLASH_DL_PATH="http://macromedia.mplug.org/tarball/debian/install_flash_player_6_linux.tar.gz"
    INTERACTIVE="yes"
    
    clean_exit(){
      [ -n "$TMP" ]&& rm -f "$TMP"
    }
    
    trap clean_exit EXIT
    
    function setup_dialog()
    {
      # Set up dialog
      XDIALOG_HIGH_DIALOG_COMPAT=1
      export XDIALOG_HIGH_DIALOG_COMPAT
    
      TMP="/tmp/knx-flashplugin.tmp$$"
    
      DIALOG="dialog"
      [ -n "$DISPLAY" ] && [ -x /usr/bin/Xdialog ] && DIALOG="Xdialog"
    
      [ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
    
      MAX=4 # number of steps
    
      case "$LANGUAGE" in
       de*)
         BT="Flashplugin-Installation"
         T1="Installation von Macromedia Flash (Schritt 0/$MAX)"
         ET="Installation fehlgeschlagen"
         ST="Installation erfolgreich"
         MESSAGE0="Dieses Skript installiert das Macromedia-Flashplugin aus dem Internet oder von einem Verzeichnis Ihrer Wahl.\n\nAutor: Fabian Franz <knx-flash@fabian-franz.de>"
         MESSAGE1="Soll das Flash-Plugin aus dem Internet heruntergeladen werden?"
         MESSAGE2="Bitte geben Sie das Verzeichnis an, wo $FLASH_NAME gefunden werden kann."
         MESSAGE3="PATH nicht gefunden. Das Skript wird beendet."
         MESSAGE4="Scanne nach neuen Plugins. (Konqueror)"
         MESSAGE5="Das Flash-Plugin wurde erfolgreich installiert."
         ;;
       *)
         BT="Flashplugin-Installation"
         T1="Installation of Macromedia Flash (Step 0/$MAX)"
         ET="Installation failed"
         ST="Installation succeeded"
         MESSAGE0="This script installs the Macromedia-flashplugin from the internet or from a directory of your choice.\n\nAuthor: Fabian Franz <knx-flash@fabian-franz.de>"
         MESSAGE1="Shall the flash plugin be downloaded from the internet?"
         MESSAGE2="Please insert the directory name, where $FLASH_NAME can be found."
         MESSAGE3="PATH not found. The script will be terminated."
         MESSAGE4="Scanning for new plugins. (Konqueror)"
         MESSAGE5="The Flash-Plugin was successfully installed."
         ;;
      esac  
      N=1; # Step 1
    }
    
    # Commandline parsing
    while [ $# -ne 0 ];
    do
      if [ "$1" = "-ni" ];
      then
        INTERACTIVE="no"
      fi
      
      if [ "$1" = "-i" ];
      then
        INTERACTIVE="yes"
      fi
    
      if [ "$1" = "--help" ];
      then
        echo "install_flashplugin - version $VERSION"
        echo "Usage: install_flashplugin <options from below>"
        echo "  -i             - Interactive Dialog mode (default)"
        echo "  -ni            - Non interactive install mode"
        echo "  -l directory   - Where to find the flashplugin"
        echo "                   if not given it is downloaded from the internet"
        echo "  --help         - This help"
        exit 1
      fi
    
      if [ "$1" = "-l" ];
      then
        FLASH_PATH=$2
      fi
    
      shift # next parameter
    done
    
    [ "$INTERACTIVE" = "yes" ] && setup_dialog
     
    if [ -n "$DIALOG" ]; then
      $DIALOG --backtitle "$BT" --title "${T1/0/$N}" --msgbox "$MESSAGE0" 15 70
      N=$(($N+1))
      
      $DIALOG --backtitle "$BT" --title "${T1/0/$N}" --yesno "$MESSAGE1" 15 70
      RC=$?
      N=$(($N+1))
      
      cd /tmp
      if [ $RC -eq 1 ]; # give location
      then
        $DIALOG --backtitle "$BT" --title "${T1/0/$N}" --inputbox "$MESSAGE2" 15 70 "$FLASH_PATH" 2>$TMP
        [ $? -eq 1 ] && exit 1 # cancel ?
        N=$(($N+1))
        FLASH_PATH=$(<$TMP)
        if [ -f $FLASH_PATH/$FLASH_NAME ]; then
          cp $FLASH_PATH/$FLASH_NAME /tmp
        else
          $DIALOG --backtitle "$BT" --title "$ET" --msgbox "${MESSAGE3/PATH/$FLASH_PATH/$FLASH_NAME}" 15 70 # error!
          exit 1
        fi
      else # dl it
        if [ $DIALOG = "dialog" ]; then
          wget $FLASH_DL_PATH
        else
          xterm -e wget $FLASH_DL_PATH
        fi
        N=$(($N+1))
      fi
    
      # Now we should have a /tmp/$FLASH_NAME
    
      if [ -f /tmp/$FLASH_NAME ];
      then
        tar xzf $FLASH_NAME
        cd $FLASH_DIR
        mkdir -p /home/knoppix/.netscape/plugins/
        mkdir -p /home/knoppix/.mozilla/plugins/
        cp $FLASH_FILES /home/knoppix/.netscape/plugins/
        cp $FLASH_FILES /home/knoppix/.mozilla/plugins/
        RC=$?
        cd ..
        #cleanup
        rm -rf $FLASH_DIR
        rm -f $FLASH_NAME
    
        if [ $RC -eq 0 ]; 
        then
          # scan for new plugins
          ( nspluginscan 2>/dev/null; echo "100" ) | $DIALOG --backtitle "$BT" --title "${T1/0/$N}" --gauge "$MESSAGE4" 10 60
        else
          $DIALOG --backtitle "$BT" --title "$ET" --msgbox "${MESSAGE3/PATH/$FLASH_FILES}" 15 70 # error!
          exit 1
        fi
      else # /tmp/$FLASH_NAME not found
        $DIALOG --backtitle "$BT" --title "$ET" --msgbox "${MESSAGE3/PATH//tmp/$FLASH_NAME}" 15 70 # error!
        exit 1
      fi
      $DIALOG --backtitle "$BT" --title "$ST" --msgbox "$MESSAGE5" 10 60
    else # non interactive
      cd /tmp
      if [ -n "$FLASH_PATH" ]; 
      then
        cp $FLASH_PATH/$FLASH_NAME /tmp
      else
        wget $FLASH_DL_PATH
      fi
      if [ -f /tmp/$FLASH_NAME ];
      then
        tar xzf $FLASH_NAME
        cd $FLASH_DIR
        mkdir -p /home/knoppix/.netscape/plugins/
        mkdir -p /home/knoppix/.mozilla/plugins/
        cp $FLASH_FILES /home/knoppix/.netscape/plugins/
        cp $FLASH_FILES /home/knoppix/.mozilla/plugins/
        cd ..
        #cleanup
        rm -rf $FLASH_DIR
        rm -f $FLASH_NAME
    
        # scan for new plugins
        nspluginscan
      else
        echo "Error accessing /tmp/$FLASH_NAME"
        exit 1
      fi
    fi
    
    exit 0 # Success!

  6. #6
    Member registered user
    Join Date
    Jan 2003
    Location
    Northridge, California
    Posts
    48

    Flash and DVD on demand.

    Maybe you could create a script with a checkbox for a whole slew of stuff

    DVD decss
    Flash Player Mozilla
    Flash Player Konqueror
    Real Media Player
    Mplayer
    Mplayer Mozilla Plugin
    Mplayer Konq Plugin
    PHP4 , GD2 , MySQL

    I guess I may be getting gentoo here.

  7. #7
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297

    Re: Flash and DVD on demand.

    [original: Sa März 29, 2003 6:13 pm]
    Quote Originally Posted by zzyzx
    Maybe you could create a script with a checkbox for a whole slew of stuff

    DVD decss
    Flash Player Mozilla
    Flash Player Konqueror
    Real Media Player
    Mplayer
    Mplayer Mozilla Plugin
    Mplayer Konq Plugin
    PHP4 , GD2 , MySQL

    I guess I may be getting gentoo here.
    DVD decss -> in mplayer
    Flash Player Mozilla - OK
    Flash Player Konqueror - OK
    Real Media Player - not possible
    Mplayer - possible with tweaking
    Mplayer Mozilla Plugin - possible & easy
    Mplayer Konq Plugin - possible & easy
    PHP4 , GD2 , MySQL - should be possible with /etc/php.ini tweaking

    Problems for the last: Dependencies needed and apt-get is due to "missing" sources-files not usable on default ... But could be possible ...

    [edit:]
    Seems, that I was wrong. New list follows:

    DVD decss -> in mplayer, but could also be otherwise possible.
    Flash Player Mozilla - OK
    Flash Player Konqueror - OK
    Real Media Player - seems actually to be possible, will test soon. [edit2: Easily possible! Only plugin needs tweaking]
    Mplayer - possible with tweaking (tweaking? at least with marillats packages I have a really high bunch of dependencies to even get the elf-file running, but heh now it works, and I'm still on CD ) )
    Mplayer Mozilla/Konq Plugin - possible & easy -> It is not! Only with root chaning /etc/profile and /etc/ld.so.conf can it be possible, but I'm stuck here. Another solution is to compile it on the fly and hardcode path of mplayer ) (did I tell you that I know the mplayerplug-in code and am contributor ? )
    PHP4 , GD2 , MySQL - should be possible with /etc/php.ini tweaking, will look into this later ...

    UPDATE! (on my local copy)

    DVD decss -> in mplayer
    Flash Player Mozilla - OK
    Flash Player Konqueror - OK
    Real Media Player - OK
    Mplayer - OK
    Mplayer Mozilla Plugin - OK
    Mplayer Konq Plugin - OK
    PHP4 , GD2 , MySQL - not tried yet

    Hm, I begin to like this multimedia-knoppix!

    I'll think about it! - More!

    cu

    Fabian

    PS: Just sent my debian-packet to Klaus. I wonder what he will say

    [edit: still now answer ... :-/]

  8. #8
    Junior Member
    Join Date
    Apr 2003
    Location
    Zurich, Switzerland
    Posts
    2
    hey, thanx a lot for this nice script. good work!
    if installing stuff in linux was as easy as with this script i would have saved ages and ages in the last few years struggling with not-met dependencies and stuff.
    kudos
    dodger

  9. #9
    Junior Member registered user
    Join Date
    Dec 2002
    Location
    Germany
    Posts
    22
    Quote Originally Posted by Fabianx
    Quote Originally Posted by probono
    Yes, please send it to the Knoppix developer maining list.

    Btw, does this enable Flash also in Konqueror atomagically? (In Konqueror, you normally have to "search for new plugins" manually before it recognizes Mozilla plugins...)
    Yes, this is done in the last step! (nspluginscan)

    I have already sent it to Klaus directly, but I think I'll have to make debian package out of it, before he accepts it ) [ debian-knoppix would be a good audience, too but I try to get it as fast as possible into the next release]

    cu

    Fabian
    It's included in 30-03-2003 in "KNOPPIX" -> "Utilities", Thanks Fabian, but I'm not sure about the legalese stuff yet. You may have to add a dialog that shows the macromedia end user license prior to downloading and installing the archive.

    Regards
    -Klaus Knopper

  10. #10
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    20

    Another place for finding about plugins

    Open Mozilla and go under Help menu at top. Look in that menu for "About Plug-ins.

    On the plug-ins list page, look top center under the page title for the plugindoc.mozdev.org link and click it.

    Look at top center of following page, for the processor platform and click it, such as "plugindocs: | Linux x86 |."

    Look for the plugin you which to configure.

Page 1 of 2 12 LastLast

Similar Threads

  1. flashplugin for konqueror
    By fabiand in forum General Support
    Replies: 5
    Last Post: 05-15-2007, 09:47 PM
  2. On-demand ISO
    By convert in forum Ideas
    Replies: 5
    Last Post: 05-22-2004, 02:01 AM
  3. A Live CD script for Auto Internet Login? (DSL)
    By bonecrusher in forum General Support
    Replies: 1
    Last Post: 03-05-2004, 11:17 AM
  4. Replies: 10
    Last Post: 07-30-2003, 04:41 AM
  5. Replies: 0
    Last Post: 03-30-2003, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x900Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x900Gb SAS, Proxmox

$340.00



Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$712.98



DELL PowerEdge R730XD 24x 2.5

DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED

$269.99



HP ProLiant  DL360p picture

HP ProLiant DL360p

$209.99



Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD picture

Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD

$89.99



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



HP Proliant DL360 Gen9 28 Core SFF Server 2X E5-2680 V4 16GB RAM P440ar No HDD picture

HP Proliant DL360 Gen9 28 Core SFF Server 2X E5-2680 V4 16GB RAM P440ar No HDD

$196.95



HP ProLiant DL360 G9 2x Xeon E5-2690 V3 24 Cores 2.6GHz P440ar 32GB DDR4 picture

HP ProLiant DL360 G9 2x Xeon E5-2690 V3 24 Cores 2.6GHz P440ar 32GB DDR4

$119.99



DELL PowerEdge R730 Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45

$284.00



1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE

$297.00