Flash Player Switcher

Browsers, email, chat, etc.
Post Reply
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Flash Player Switcher

#1 Post by rcrsn51 »

This is a tray applet that turns Adobe Flash Player on/off. It simply renames /usr/lib/mozilla/plugins/libflashplayer.so to libflashplayer.so.off and back again.

It takes effect on the next restart of your browser.

If the applet is working correctly, it should change colour when you click on it. But it occasionally does not load properly into the tray and needs:

Code: Select all

 jwm -restart
----------------------
Attachments
flashplayer_switcher-1.0.pet
(3.76 KiB) Downloaded 236 times
Last edited by rcrsn51 on Sun 19 Feb 2017, 22:23, edited 5 times in total.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#2 Post by Semme »

Convenient, though after initially permitting a site, you'd still have to reload your browser to discontinue play.

For most folks however, far easier than revisiting a browsers preference panel.

Nice addition.. Thanks.
Attachments
fp-tray2.jpg
(4.48 KiB) Downloaded 741 times
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

Thanks for testing. This applet is not intended to be a site-by-site blocker. There are Flash-blocking plugins for that.

Now that Youtube does HTML5, I find it easier to leave Flash off most of the time and only turn it on when needed.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#4 Post by Semme »

I understand and agree. Having had something similar in place, it should prove handy for others.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#5 Post by Mike Walsh »

Hallo, Bill.

Very neat little applet, I must say. Just out of curiosity, d'you think it would be possible to make this work with PepperFlash? Having extracted it, and had a look, I see it's operated by a binary in /root/Startup.

Did you manufacture the binary yourself? Or did you adapt it from elsewhere?


Mike. :wink:

Pelo

downloading free music to my jukebox, aqualung to-day.

#6 Post by Pelo »

excellent ! just what i am needing right now. Desactivate Flashplayer allows me downloading free music to my jukebox, aqualung to-day.
Attachments
off.jpg
Puppy Berylpup, it works even with Beryl desktop.
(9.27 KiB) Downloaded 348 times
Last edited by Pelo on Sun 09 Apr 2017, 16:54, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#7 Post by rcrsn51 »

Mike Walsh wrote:Did you manufacture the binary yourself?
Here is the source.
Attachments
flashplayer_switcher_tray_source.tar.gz
(809 Bytes) Downloaded 202 times

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#8 Post by Mike Walsh »

Thanks, Bill.

I'll have a look into this when time permits, and see if I can't hone my compiling skills a bit further..! Much appreciated.

Cheers.


Mike. :wink:

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

Does pepperflash use an equivalent to /usr/lib/mozilla/plugins/libflashplayer.so? Where is it located?

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#10 Post by Mike Walsh »

Morning, Bill.
rcrsn51 wrote:Does pepperflash use an equivalent to /usr/lib/mozilla/plugins/libflashplayer.so? Where is it located?
Short answer; I wish..! The trouble with Pepper is that its location is totally non-standard, depending on which of the Chromium-based browsers you're looking at......and is the reason why I've had to make so many different versions of my PepperFlash .pets.

I'll give you a few examples:-

Chrome: /opt/google/chrome/PepperFlash/libpepflashplayer.so

Chromium: Prior to version 37, it was in /usr/lib/chromium-browser/plugins/libpepflashplayer.so. From 37-42, it was at /usr/lib/PepperFlash/libpepflashplayer.so. And from 43 onwards, it moved inside the Chromium directory, at /usr/lib/chromium/PepperFlash/libpepflashplayer.so.

Nightmare.

SlimJet has it inside the Slimjet directory.

Iron wants it in /usr/lib/adobe-flashplugin, alongside libflashplayer.so.

Vivaldi creates a new directory at /usr/lib/pepperflashplugin-nonfree, and sticks it in there..!!

It's impossible to make a 'default' .pet of it that everybody can use......although there have been rumours floating around for a while that all the Chromium-based browsers will eventually standardise on /usr/lib/adobe-flashplugin, along with NPAPI Flash. This is the location preferred by not only Canonical, but many of the RPM-based distros, too.

----------------------------------------------------------------------------------------------------

I've always been a fan of the Chromium-based browsers. I run the same four browsers in every Pup, from a remote partition, sym-linked into each Pup where it expects to find them.

To make matters easier, I have a PepperFlash directory in this same remote partition, beside the browsers, along with other 'relevant' directories (/usr, /root, etc.) This is then sym-linked into each browser at the correct location, to simplify matters further still.

Which means I only need to update Pepper twice, each time a new version comes out; once for 32-bit, once for 64-bit (I have a separate 'AMD64' directory in the remote partition for the 64-bit stuff).....and all the browsers get the new version.

In fact, I don't even need to do it manually any longer. Our Russian colleague, SFS, came up with a modified auto-update script for Pepper, which works in the same manner as Geoff's Flash Auto-updater. It sits in /root/Startup of every Pup, and checks for a new version at every boot. If it finds a new one, it automatically upgrades it for you.

(I've included SFS's Pepper update script below. Just remove the '.zip' extension, make it executable, modify the paths for your particular needs, and stick it in /root/Startup. Or you can just run it from the terminal, manually.....it'll tell you what it's doing. It'll work equally well for 64-bit versions.)

So, just to see if this would work, I used the source code and build script you supplied, modified the paths for my 'common' PepperFlash directories everywhere it was necessary, and re-manufactured the .pet, along with new, home-made icons.

It works a treat. I, too, prefer to use HTML5 wherever possible, and it's so much easier if the browser can't actually find Pepper in the first place..!

---------------------------------------------------------------------------------

I built it in X-Slacko 2.3.2 last night. Here it is running in Precise 5.7.1:-

"OFF":-


Image


.....and "ON":-


Image


You can see your original further to the right.

You're a bloody genius, Bill.....I don't know where we Puppians would be without you..! :lol:

Thanks for publicising your code, mate. It's very much appreciated. Cheers! :D


Mike. :wink:
Attachments
UpdatePep32.zip
PepperFlash auto-updater by SFS
(1.46 KiB) Downloaded 189 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

Nice work. I thought about replacing /usr/lib/mozilla/plugins/libflashplayer.so with a link to the location of the actual pepperflash.so. That way, you would not have to change the applet code for different Chromes.

But it didn't work. The link file would turn on/off, but the target .so file would remain active and the browser would find it.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#12 Post by Mike Walsh »

Hallo, Bill.

Yes, well; this is why I find it advantageous to set everything up so that my libpepflashplayer.so lives in one, fixed location. It takes some doing, initially, including liberal use of Puppy's very powerful sym-link function (!!).....but it pays off in the end.

And the build-script really simplified things.

Thanks again.


Mike. :wink:

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#13 Post by rcrsn51 »

Here's a variation that should be more flexible.

1. Create the hidden config file /root/.flashplayer_switcher
2. Add ONE line at the TOP with the full path to the plugin.so file, like

Code: Select all

/opt/google/chrome/PepperFlash/libpepflashplayer.so
3. Start the applet.
4. It will read the path from the config file and redirect the applet to turn that file on/off.
Attachments
flashplayer_switcher_redirect_tray_source.tar.gz
(936 Bytes) Downloaded 195 times

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#14 Post by keniv »

@rcrsn51
Am using your first post version in lucid 5287. Working well including the icon colour change.

Thanks,

Ken.

Pelo

It is worth an addition on french forum.

#15 Post by Pelo »

It is worth an addition on French forum, please cross the channel just by clicking the blue

Post Reply