The time now is Tue 26 Jan 2021, 05:44
All times are UTC - 4 |
Page 1 of 8 [116 Posts] |
Goto page: 1, 2, 3, ..., 6, 7, 8 Next |
Author |
Message |
Geoffrey

Joined: 30 May 2010 Posts: 2379 Location: Queensland
|
Posted: Tue 04 Aug 2015, 22:04 Post subject:
Adobe Flash Player Auto Updater |
|
I've written a script that can be placed in /root/Startup and will check if there is a newer version of flash player on each boot or restart of X, if there is it will automatically download the lastest linux version then extract the libflashplayer.so and move it to /usr/lib/mozilla/plugins, replacing the the old version.
Edit: New version 1.1, this has a download progess bar, if for any reason the the script halts, it can be restarted manually or restartX, the download will resume, it also makes a backup of the old libflashplayer.so.
Edit: New version 1.2, I just changed the way the version number is parsed from the web page, it's a one liner now.
I noted that there is a problem, the command "/usr/bin/strings" and "/usr/lib/libbfd-2XXX" from the devx are needed to read the content of libflashplayer.so to get the version number
I tried it using "busybox strings" applet, this works for me in carolina, please test this, if your flash player is up to date then nothing will download.
Edit: New version 1.3, this now has a menu entry in the internet menu, has option to run at startup, if the download it stopped it can be resumed, test this please, it works fine for me but it may have problems I haven't noticed, the script is bit of a mishmash but works, ideas are welcome.
It now uses " awk" instead of "busybox strings" .
Edit: New version 1.4, rewrite of script, now uses gtkdialog for download progress, yad no longer a dependency, rg66 had problems from his location, if unable to find get.adobe.com/flashplayer then checks adobe.com/software/flash/about for version info.
Edit: New version 1.5, edited script as adobe wasn't detecting the OS, thanks sfs.
Edit: New version 1.6, flashplayer now follows Firefox - NPAPI.
Edit: New version 1.7, fixed finding installed version number, now only checks for updates at adobe.com/software/flash/about
Edit: New version 1.8, fixed finding latest available version number, at adobe.com/software/flash/about
Code: | #!/bin/bash
# By Geoffrey, do with as you please.......
# 15052017
# Update Flash v1.8
# Used sed in place of perl as suggested by sfs
# yad no longer a dependency, uses gtkdialog
# fixed url not found "get.adobe.com/flashplayer/" from some locale's, get update version info from alternate url "adobe.com/software/flash/about" rg66
# fix linux detection by sfs
# 14122016 final, Linux flashplayer now follows Firefox - NPAPI
# 20022017 reverted back to using busybox strings to get libflashplayer.so version number
# now only looks for new version @ adobe.com/software/flash/about
# URL fix 15052017
FLASH_UPDATER="$(readlink -e "$0")"
sleep 0.3
if [ `pidof "$(basename "$FLASH_UPDATER")" -o %PPID | wc -w` -gt 1 ]; then
gtkdialog-splash -icon "/usr/share/pixmaps/flash-player-properties.png" -timeout 6 -fontsize x-large -text "
Flash Updater is running.
" &
exit 1
fi
if [ ! -f ~/.flash_update/index.html ]; then
IFCONFIG="`ifconfig | grep '^[pwe]' | grep -v 'wmaster'`"
while [ "$IFCONFIG" != "" ]; do
sleep 1
ping -c 1 8.8.8.8
if [ $? -eq 0 ];then
break
else
ping -c 1 www.google.com
if [ $? -eq 0 ];then
break
fi
fi
done &> /dev/null
fi
function DOWNLOAD_FLASH(){
URL='fpdownload.adobe.com/get/flashplayer/pdc/'$LATEST_VERSION'/flash_player_npapi_linux.i386.tar.gz'
wget -t 2 -T 20 --waitretry=20 --spider -S "$URL" > ~/.flash_update/filesize 2>&1
SIZE=`echo $(awk '/^Length: / {print $3}' ~/.flash_update/filesize) | sed 's/^.\(.*\).$/\1/'`
export DOWNLOADER_GUI='
<window title="Download Flash Player Update" icon-name="flash-player-properties" border-width="10" resizable="false">
<vbox>
<progressbar width-request="300">
<label>Please Wait...</label>
<input>wget --no-check-certificate -4 -c -t 5 -w 5 -P ~/.flash_update '$URL' 2>&1 | sed -nru "s|.* ([0-9]+%) +([^ ]+).*$|\1\nDownloading \1 of '$SIZE' @ \2B/sec |p" 2>/dev/null</input>
<action type="exit">Ready</action>
</progressbar>
<hbox homogeneous="true">
<button use-underline="true">
<label>"_Cancel "</label>
<input file stock="gtk-close"></input>
<action>func_terminate_service</action>
<action>EXIT:exit</action>
</button>
</hbox>
</vbox>
</window>'
I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog --program=DOWNLOADER_GUI); do
eval $STATEMENTS
done
IFS=$I
[ $EXIT = exit ] && exit 1
cd ~/.flash_update/
tar -zxvf flash_player_npapi_linux.i386.tar.gz libflashplayer.so &> /dev/null
chown root:root libflashplayer.so
cd /
rm /usr/lib/mozilla/plugins/libflashplayer.so
mv ~/.flash_update/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so
export INSTALLED_VERSION=$(busybox strings -n13 /usr/lib/mozilla/plugins/libflashplayer.so | grep 'FlashPlayer_' | cut -d '_' -f2-5| tr '_' '.')
gtkdialog-splash -icon "/usr/share/pixmaps/flash-player-properties.png" -timeout 6 -fontsize x-large -text "Flash Player has now been updated
Version $INSTALLED_VERSION"
[ "$LATEST_VERSION" = "$INSTALLED_VERSION" ] && rm -r ~/.flash_update
func_terminate_service
}
export -f DOWNLOAD_FLASH
func_terminate_service(){
PID_UPDATE_FLASH=$(pidof update_flash)
GUI=$(ps -ef | grep program=FLASH_UPDATER_GUI | grep -v grep | awk '{ print $2 }')
kill "$PID_UPDATE_FLASH"
kill "$GUI"
}
export -f func_terminate_service
[ ! -f ~/Startup/update_flash ] && echo false > ~/.update_flash
if grep -q true ~/.update_flash 2> /dev/null;then
CHECKBOX='<default>true</default>'
else
CHECKBOX='<default>false</default>'
fi
mkdir -p ~/.flash_update
if [ ! -f ~/.flash_update/index.html ]; then
wget --no-check-certificate -O- --spider adobe.com/software/flash/about/ > ~/.flash_update/flash_url 2>&1
if grep -q '200 OK' ~/.flash_update/flash_url 2> /dev/null; then
wget -q -N -P ~/.flash_update adobe.com/software/flash/about/
else
gtkdialog-splash -icon "/usr/share/pixmaps/flash-player-properties.png" -timeout 8 -fontsize x-large -text "The Adobe web site appears
to unavailable at this time
Please try again......."
rm -r ~/.flash_update && func_terminate_service
fi;fi
export LATEST_VERSION=`cat /root/.flash_update/index.html | grep -A3 Linux | grep [0-9] | awk -F '[><]' '{print $3}' | tr -d "\n"` #rg66
export INSTALLED_VERSION=$(busybox strings -n13 /usr/lib/mozilla/plugins/libflashplayer.so | grep 'FlashPlayer_' | cut -d '_' -f2-5| tr '_' '.')
if [ "$LATEST_VERSION" = "$INSTALLED_VERSION" ]; then
TEXT="<b><span size='"'large'"'>Adobe Flash is up to date...</span></b>"
TEXT_VERSION="<b><span size='"'x-large'"'>Current Version $INSTALLED_VERSION</span></b>"
TEXT_LINE1="$TEXT"
TEXT_LINE2="$TEXT_VERSION"
BUTTON1='<button use-underline="true">
<label>" _About"</label>
<input file stock="gtk-info"></input>
<action>disable:TIMER</action>
<action>launch:UPDATER_ABOUT</action>
</button>'
TIMER='<timer seconds="true" interval="8" visible="false">
<variable>TIMER</variable>
<action>EXIT:exit</action>
</timer>'
rm -r ~/.flash_update
else
if [ -f ~/.flash_update/flash_player_npapi_linux.i386.tar.gz ]; then
TEXT="<b><span size='"'large'"'>Adobe Flash update has already started...</span></b>"
TEXT_VERSION="<b><span size='"'x-large'"'>New Version $LATEST_VERSION</span></b>"
TEXT_LINE1="$TEXT"
TEXT_LINE2="$TEXT_VERSION"
BUTTON1='<button use-underline="true">
<label>" _About"</label>
<input file stock="gtk-info"></input>
<action>launch:UPDATER_ABOUT</action>
</button>'
BUTTON2='<button use-underline="true">
<label>"_Resume"</label>
<input file stock="gtk-apply"></input>
<action>DOWNLOAD_FLASH</action>
</button>'
else
TEXT="<b><span size='"'large'"'>A New Adobe Flash update is Available</span></b>"
TEXT_VERSION="<b><span size='"'x-large'"'>New Version $LATEST_VERSION</span></b>"
TEXT_LINE1="$TEXT"
TEXT_LINE2="$TEXT_VERSION"
BUTTON1='<button use-underline="true">
<label>" _About"</label>
<input file stock="gtk-info"></input>
<action>launch:UPDATER_ABOUT</action>
</button>'
BUTTON2='<button use-underline="true">
<label>"_Update"</label>
<input file stock="gtk-apply"></input>
<action>DOWNLOAD_FLASH</action>
</button>'
fi;fi
LINK="<b><u><span color='"'blue'"'>Update Flash 1.8 By Geoffrey 15th May 2017</span></u></b>"
ABOUT="<b><span size='"'x-large'"'>Adobe Flash Updater</span></b>"
export UPDATER_ABOUT='
<window title="Flash Player Updater" icon-name="gtk-about">
<vbox>
<text wrap="false" justify="2" use-markup="true"><label>"'$ABOUT'"</label></text>
<eventbox tooltip-text=" Adobe Flash Player Auto Updater " hover-selection="true" homogeneous="true">
<text justify="2" use-markup="true"><label>"'$LINK'"</label></text>
<action signal="button-press-event">defaultbrowser http://www.murga-linux.com/puppy/viewtopic.php?t=100523 &</action>
</eventbox>
<text><label>""</label></text>
<text wrap="false" justify="2" use-markup="true"><label>"Updates only the flash player plugin libflashplayer.so"</label></text>
<text><label>""</label></text>
<hbox space-fill="false" space-expand="true" homogeneous="true">
<button ok>
<action>closewindow:UPDATER_ABOUT</action>
</button>
</hbox>
</vbox>
<variable>UPDATER_ABOUT</variable>
</window>'
export FLASH_UPDATER_GUI='
<window title="Flash Player Updater" icon-name="flash-player-properties" border-width="10" resizable="false">
<vbox>
<hbox>
<vbox>
<pixmap>
<input file icon="flash-player-properties"></input>
<height>48</height><width>48</width>
</pixmap>
</vbox>
<vbox>
<text wrap="false" xalign="0" use-markup="true"><label>"'$TEXT_LINE1'"</label></text>
<text wrap="false" xalign="0" use-markup="true"><label>"'$TEXT_LINE2'"</label></text>
<checkbox use-underline="true">
'$CHECKBOX'
<label>_Run Flash Player Updater at startup</label>
<variable>STARTUP</variable>
<action>echo $STARTUP > ~/.update_flash</action>
<action>if true ln -s /usr/bin/update_flash ~/Startup/update_flash &> /dev/null</action>
<action>if false rm ~/Startup/update_flash &> /dev/null</action>
</checkbox>
</vbox>
</hbox>
<hbox homogeneous="true">
<hbox>
'$TIMER'
'$BUTTON1'
'$BUTTON2'
<button use-underline="true">
<label>"_Cancel "</label>
<input file stock="gtk-close"></input>
<action>EXIT:exit</action>
</button>
</hbox>
</hbox>
</vbox>
</window>'
gtkdialog --program=FLASH_UPDATER_GUI >/dev/null 2>&1
|
 |
Description |
|
Filesize |
20.86 KB |
Viewed |
4923 Time(s) |

|
Description |
|

Download |
Filename |
update_flash-1.8.pet |
Filesize |
3.2 KB |
Downloaded |
2813 Time(s) |
Last edited by Geoffrey on Sun 14 May 2017, 18:28; edited 13 times in total
|
Back to top
|
|
 |
Mike7

Joined: 18 Feb 2013 Posts: 400
|
Posted: Wed 05 Aug 2015, 17:51 Post subject:
Re: Adobe Flash Player Auto Updater |
|
Cool!
Can this simply be copied off the page, or should the tar.gz be used?
M.
_________________ Carolite-1.2 w/FF38 on bootable 16G flash drive; Asus eeePC 1000HA, Atom CPU, 2G RAM, 160G HDD.
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2379 Location: Queensland
|
Posted: Wed 05 Aug 2015, 19:27 Post subject:
Re: Adobe Flash Player Auto Updater |
|
Mike7 wrote: | Cool!
Can this simply be copied off the page, or should the tar.gz be used?
M. |
Mike, download the new pet, this one works much better.
I did note that firefox didn't register that it had a new flash plugin,
I had to rename the libflashplayer.soxxx so as fiirefox couldn't find it,
then ran firefox checked the plugins to make sure the plugin wasn't listed,
then renamed it libflashplayer.so, then firefox found the new flash version.
I've seen that others have mentioned that installing a new flash player
firefox didn't show any change, there must be a simple fix for that
Geoff
_________________ Carolina: Recent Repository Additions

|
Back to top
|
|
 |
Puppus Dogfellow

Joined: 07 Jan 2013 Posts: 1669 Location: nyc
|
Posted: Wed 05 Aug 2015, 22:54 Post subject:
|
|
thanks for this, Geoffrey.
|
Back to top
|
|
 |
666philb

Joined: 07 Feb 2010 Posts: 3635 Location: wales ... by the sea
|
Posted: Thu 06 Aug 2015, 15:11 Post subject:
|
|
thanks geoffrey,
added the link to this page in tahrpups getflash
_________________ Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2379 Location: Queensland
|
Posted: Fri 07 Aug 2015, 05:23 Post subject:
Re: Adobe Flash Player Auto Updater |
|
Update to 1.2
Fixed a problem. the "strings" command from the devx was needed, I changed the command to "busybox strings" this appears to work.
_________________ Carolina: Recent Repository Additions

|
Back to top
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 4439 Location: West Lothian, Scotland, UK
|
Posted: Fri 07 Aug 2015, 14:43 Post subject:
|
|
Hate to be the bearer of bad news, but...
1. I tried the original version, and that crashed Firefox, so...
I deleted my slackosave.4fs and restored a backup copy. then....
2. Installed the latest updateflash-1.2.pet, and that too crashed both Firefox-39.0 and Palemoon-24.7.1.
So, I've yet again restored my backup slackosave.4fs.
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2379 Location: Queensland
|
Posted: Fri 07 Aug 2015, 16:12 Post subject:
|
|
Sylvander wrote: | Hate to be the bearer of bad news, but... |
I've been testing also, I tried it with palemoon and it asks to be updated even though it's the latest version 11.2.202.491, checking online say's Quote: | Flash Player Plugin on Linux 11.2.202.424 and lower (click-to-play) has been blocked for your protection. |
I get the same result if I use the 11.2.202.491 pet from the repo, so it's not the script as all it does is download the same files as the pet is made from.
I just installed seamonkey and it works ok with it, so it's an issue with palemoon and as for firefox it don't seem to refresh the plugin, if you do as I did and rename or temporarily move the libflashplayer.so file then run firefox, check that the plugin is not loaded, close firefox and replace the libflashplayer.so, I think you'll find that it will then work.
I tried the script in puppy vivid 6.5, works fine with the " busybox strings " command.
_________________ Carolina: Recent Repository Additions

Last edited by Geoffrey on Sat 08 Aug 2015, 18:28; edited 2 times in total
|
Back to top
|
|
 |
666philb

Joined: 07 Feb 2010 Posts: 3635 Location: wales ... by the sea
|
Posted: Fri 07 Aug 2015, 16:20 Post subject:
|
|
the flash out of date warning is a problem in older palemoons ,.... this shouldn't be an issue in 25+
_________________ Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2379 Location: Queensland
|
Posted: Fri 07 Aug 2015, 16:37 Post subject:
|
|
I've updated palemoon, works ok now, I can see what the problem was, palemoon wasn't parsing the version correctly, it was showing " 11,2,202,491 " instead of " 11.2.202.491 "
_________________ Carolina: Recent Repository Additions

|
Back to top
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 4439 Location: West Lothian, Scotland, UK
|
Posted: Sat 08 Aug 2015, 06:32 Post subject:
|
|
@Geoffrey
1. "it's an issue with palemoon"
I updated Palemoon to version 25.5.0, and the updated version doesn't have all of the nice links.
How to get those back?
But I won't re-install your pet until all of the problems have been fixed.
2. "...as for firefox it don't seem to refresh the plugin"
Errr...which plugin?
I don't understand.
3. "...if you do as I did and rename or temporarily move the libflashplayer.so file then run firefox check the plugin is not loaded..."
Um, confused again...
Did you mean "then run firefox, AND check the plugin is not loaded"
Which plugin? FlashPlayer?
4. "...close firefox and replace the libflashplayer.so"
With what exactly?
A more up-to-date copy? Which?
Am I coming across as dense?
|
Back to top
|
|
 |
Semme

Joined: 07 Aug 2011 Posts: 8427 Location: World_Hub
|
Posted: Sat 08 Aug 2015, 08:13 Post subject:
|
|
1) Nice links from which version? Are you referring to the ones that come standard or your old ones?
2) There's only ONE plug-in we're discussing.
3) Yep, FlashPlayer. He meant, if you rename or move it elsewhere, Adobe's page would say it's NOT installed. Follow"
4) Yeah, replace it with a different one.. And older if need be.
_________________ >>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
|
Back to top
|
|
 |
Mike Walsh

Joined: 28 Jun 2014 Posts: 6397 Location: King's Lynn, UK.
|
Posted: Sat 08 Aug 2015, 18:48 Post subject:
|
|
Hi, Geoffrey.
Hmm. That last stanza in the script looks awfully familiar..! Mavrothal's network 'readiness' script looks to be proving itself quite useful...
Might give this .pet a try myself, even though I've got into a routine of checking Flash Player version with this page:-
http://www.adobe.com/uk/software/flash/about/
...and then downloading and manually installing the new libflashplayer.so as & when necessary.
I do the same thing with libpepflashplayer.so for Chrome/Chromium .....although that's a bit more long-winded; it entails downloading the newest version of 'google-chrome' from the 'Get Chrome' downloads page, then extracting the libpepflashplayer.so from the mess, and discarding the rest of it. Seems a bit of a waste of bandwidth, but that's how Ubuntu gets Pepperflash for Chromium; exactly the same way. I'm guessing that's probably how peebee gets it for his Chromium .pets & .sfs's.....and then includes it with the browser versions when he re-packages them.
Necessary for both in my case, since I don't run the newest versions of either of 'em..!
Pepperflash has never been available as a separate download, the way the Linux version of Flash has, 'cos Google always 'bundles' it in with Chrome as a complete package, so.....anybody wanting it for Chromium has to go the same route, since it's the only way to obtain it! Appears to be the way their 'exclusive' arrangement with Adobe for the up-to-date version of Linux Pepperflash works...
Hey ho.
Mike.
_________________ MY 'PUPPY' PACKAGES

Last edited by Mike Walsh on Sat 08 Aug 2015, 19:40; edited 2 times in total
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2379 Location: Queensland
|
Posted: Sat 08 Aug 2015, 19:31 Post subject:
|
|
Sylvander wrote: |
1. "it's an issue with palemoon"
I updated Palemoon to version 25.5.0, and the updated version doesn't have all of the nice links.
How to get those back? |
I have no idea, that's to do with Palemoon not the flash plugin
Quote: |
2. "...as for firefox it don't seem to refresh the plugin"
Errr...which plugin?
I don't understand.
3. "...if you do as I did and rename or temporarily move the libflashplayer.so file then run firefox check the plugin is not loaded..."
Um, confused again...
Did you mean "then run firefox, AND check the plugin is not loaded"
Which plugin? FlashPlayer?
4. "...close firefox and replace the libflashplayer.so"
With what exactly?
A more up-to-date copy? Which? |
From what I've noted is that Firefox does not recognize that the flash plugin(libflashplayer.so) has changed,
after the update script has done it's magic or for that matter the latest flash pet package,
it don't seem to look for the version number but only that the file exist, so if you rename the /usr/lib/mozilla/libflashplayer.so to libflashplayer.sox
and then run firefox, select the menu > Tool > Add-ons and look under Plugins, Shockwave flash shouldn't be listed,
now close Firefox, name it libflashplayer.so then rerun Firefox, the flash plugin should be seen as the new/latest version.
Well that's how I have overcome the problem, I have Firefox version 39.0.3, it may not need this done with other versions.
Mike Walsh wrote: | Hmm. That last stanza in the script looks awfully familiar..! Mavrothal's network script looks to be proving itself quite useful... Laughing |
Yes, it does come in handy for anything that relies on a network connection.
_________________ Carolina: Recent Repository Additions

|
Back to top
|
|
 |
bigpup

Joined: 11 Oct 2009 Posts: 13981 Location: S.C. USA
|
Posted: Sun 09 Aug 2015, 00:12 Post subject:
|
|
First, I thank you for offering this!!!!!!!
Flash Player is a constant issue
However, I will never use anything that, at bootup, automatically connects to the internet, downloads stuff, and installs it.
I choose when a program does things
If you offer an option, so the program searches for a new version of Flash Player, notifies about the update, but gives you the option to download and install.
I could use that
_________________ The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
|
Back to top
|
|
 |
|
Page 1 of 8 [116 Posts] |
Goto page: 1, 2, 3, ..., 6, 7, 8 Next |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|