HOWTO: Fast terminal upgrade by quick launcher icon

Share your own howto's etc. Not for support questions!

HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-03-25 04:02

Preface: Consider my super simplified sources list right here(Syntax verified, no typo's); including the change for optional Firefox Release version:
deb jessie non-free contrib main
# deb-src jessie main contrib non-free

deb jessie-updates non-free contrib main
# deb-src jessie-updates main contrib non-free

deb jessie-backports non-free contrib main
# deb-src jessie-backports main contrib non-free

deb jessie/updates non-free contrib main
# deb-src jessie/updates main contrib non-free

deb jessie-backports firefox-esr

Non-Gnome3 users issue:
sudo apt-get purge update-notifier && apt-get install pk-update-icon

Update (Why): The old update-notifier moved into Gnome(which means Gnome 3) only. Those on XFCE, Mate(old Gnome 2, GTK stuff) and others were left to fin for themselves.
However a new pk-update-icon in back-ports fills the gaps. So you could upgrade that GUI way and with extras (notification) such as if they are "important" upgrades. When installed; pk-update-icon only shows up in the panel (later) when there's an upgrade. It also requires gnome-packagekit and its dependencies. My howto (no notify) doesn't require those dependencies. Not that it's necessarily a deal breaker; but for how it works. You could do both (GUI and enhanced terminal) upgrading. You could just put gnome-packagekit icon in your panel and you can upgrade through that (GUI) on demand. GUI is a good option for new users. Terminal (helped a bit here) offers more custom flexibility, vision and power. Neither is perfect. For a terminal example; if your connection happens to be down then do not say "Y"es to a bunch of recommendations. <CTRL>-C out of the whole script instead. But you can have your terminal (inside it) set the way you like it with it's profile defaults.

Therefore; consider this a simple, edit-able script below and with the details of how to activate any script from a one-click launcher (in Mate exactly and similarly in others).

Pre -Alert ADDENDUM: On again/off again. Now the automatic Pepper upgrade script commands (for CHROMIUM and pulled from Chrome actual) work again (still no longer reporting the version like before). Go to to check Peppers version for ChromIUM (specifically) it's now (at this writing), actually NEWER than Adobes own latest stated version. On par (pulled from) with Chrome's embedded Pepper Flash. So the absolute newest Adobe Flash for OS [and probably still exploit-able as fart]. It's the least irresponsible Adobe Flash you can get! :)

Fix new Pepper Flash key error (cut and paste each):
gpg --keyserver --recv-keys 1397BC53640DB551
gpg --export --armor 1397BC53640DB551 | sudo sh -c 'cat >> /usr/lib/pepperflashplugin-nonfree/pubkey-google.txt'

AFTER that; the auto pepper update assumes you have Chromium and pepper flash (always sucked out of Chrome) plugin installed. So ...
sudo apt-get install chromium chromium-l10n pepperflashplugin-nonfree

General Reminder: Check any problems with browser add-ons as disabled to avoid conflicts. (Like Google Disconnect and web video.)
Alert: The pepper Flash part here is just an example of script additions. Pepper is (was) NOT upgrading or reporting it's new version correctly like it was (included here removed in this script) and there's a new exploit currently reported for Flash yet again! Still folks are making Flash ONLY pages!!!!! [Like on-line TV]. See
The Pepper updater (here) was reporting a version number. You may require...
sudo apt-get purge pepperflashplugin-nonfree && sudo apt-get install pepperflashplugin-nonfree

Overview: Debian can email it needs upgrading; but that's not what I wanted. No pre-check notify/notifier required. No more daily hunting (Ctrl-R in terminal for Reverse search) and pecking [typoes] for these. It just works. Your way; too.
This is for those who want to upgrade about once a day or when they first go on-line; before they start working. This is a simplistic hybrid of sorts; in that it still requires user intervention. I like to see what's upgrading and decide about any errors as required. You could simply add more or less automation to your (icon launched) '' script and so amend what your one-click launcher will do. It's just really quick to get the terminal going with an upgrade this click-able way.

Experts please post any script improvements and ideas.

Note: I use the Mate(alone); on Debian stable with select back-ports (Firefox release, Libre Office, etc...) as needed.
This example uses mate-terminal; but you can easily adapt it to other or your preferred terminal; where ever you have set your favorite terminal preferences, This allows just one simple default terminal profile to your set way.

Easy for cut and paste...

User must be in the sudo group for this one. [This sudo way asks for a password again when there's any long delays]
#!/bin/bash --init-file
echo 'Upgrading your entire Debian system'
sudo apt-get update
sudo apt-get dist-upgrade
#echo 'Upgrading Adobe Pepper Flash for Chromium (Broken? Check version elsewhere.)'
#sudo update-pepperflashplugin-nonfree --verbose --install

Note: the --init-file in the top script comment/tag is what keeps the terminal up; when called from a launcher/icon.

Addendum: (OPTIONAL remove-able parts for not upgrading to newest Pepper)...
echo 'Upgrading Adobe Pepper Flash for Chromium (Broken? Check version elsewhere.)'
sudo update-pepperflashplugin-nonfree --verbose --install

Note: Using this separate script (instead of just, "sudo apt-get update && sudo apt-get dist-upgrade", stuffed in the launcher command) allows for easy script editing in user space. It also shows how to make other panel launchers for any other scripts and jobs. It is open for additional functions you may want to do; along with the standard update and upgrade.

1. Paste (with pluma or your fav editor) the above code as a text file (script) and name it [not upDate]

2. Save it into your home folder AKA /home/*you*; so it's in the path.

3. Make sure to right-click this script and check and Allow executing as a program under permissions

4. Now this script is done and also ready to be run from a new launcher on your panel.

5. Right click the panel, then click 'Add to panel' and add a 'Custom Launcher'.

6. Right click your launcher icon and select Properties.

7. Name it "Upgrade Now" (or your choice) in the name field and leave the comment field blank.

8. In the main command field enter exactly...
mate-terminal -e ./

9. ...leave it as an Application only; because the terminal is an application and it will use your mate-terminal ("-e" is just is short for a "--command" to follow and compound commands need to be in quotes; but not here). So the mate-terminal (or what have you) is using all your pre-set terminal preferences as you have set them in it (default profile). Such as transparency, maybe bright green letters on black (see through just a little background), terminal width (AKA columns) etc... and what have you.

10. Finally (After right-clicking Launcher for properties) just click the new icon itself and pick your fancy icon preference for upgrading.

Note: Pick an icon from what you have installed or just ...
sudo apt-get install mate-icon-theme-faenza

If you still do not see the following folder/icon just remove and re-install them by:
sudo apt-get remove mate-icon-theme-faenza && sudo apt-get install mate-icon-theme-faenza

Finding the icons then might have been time consuming; but where to look. Click "File System", and (drill down to)....


...for a yellow/orange sun star looking upgrade icon; that stands out well. I also panel "move"-ed (right click) my launcher to the right side of the network-manager bars; for convenience. You may have to also "unlock" other panel icons to move this around them.

Note: I realized it didn't matter if the my panel upgrade icon changed shade or notify (that is upDATE anyway), when an upgrade was needed ; I just wanted to upgrade everyday and before starting work; for security reasons. I didn't want auto daily (cron) upgrade; because watching in the terminal you get better feedback.

General Mate related tips: I prefer one unified Panel and on the bottom; which is simple to do. Once all Mate panel icons are unlocked (right-click & Unlock) then you can just drag icons from another panel to another. Then simply delete the scavenged, old and unwanted second (top) panel. It's easy to add panel items too. I also use the, "Application / Places / System" included Mate menu button/type (of the two or three for the 'menu' choices) instead.

This simple script ...

    o Reloads (update) what's available....

    o It does the main (dist) upgrade *and* in your terminal; where you can see a better feedback and interact with it. Y/N. Plus you can see any errors, fails (repo changes) and others.

    Note OPTIONAL --> Then (to catch EVERYTHING) it even upgrades Adobe's (damnable flash must die!) PepperFlash for Chromium for usage on rare cases you want it (in an isolated browser; away from Firefox with NO FLASH on Firefox for safety). Therefore it is the latest Flash + Linux safely(-er). NOT MIXED. NOT WINE. The additional --verbose lets you know if it's already upgraded clearly. FLASH is not secure.

    Note: 32-bit issue: This (--verbose --install) was showing the flash version and it reports if it's current. Research shows PEPPER upgrade is (Google) down.
    Addendum: Google has stopped ongoing Pepper Flash for 32-bit on Chrome and so Chromium also. Only 64-bit continues.

    o You can of course edit the script for your particular needs.

Tested for coolness; for you by me.

Last edited by neodeb on 2017-03-11 06:29, edited 58 times in total.
Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Re: HOWTO: FULL upgrade by Panel launcher icon with one clic

Postby Early Cuyler » 2016-03-27 01:40

Thank you so much for taking the time to out together / post this info! It has certainly made my life a bit easier :).
Early Cuyler
Posts: 1
Joined: 2016-03-27 01:35

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-04-01 19:30

You are most welcome.

The Firefox branded "release" version (in the MOZILLA backports for stable) is now available; instead of Iceweasel. See Debian mozilla wiki.

Flash is dead. Keep it out of your main browser, check any add-ons (Google disconnect may conflict) and then you may find web video works fine.

This is where we can make a difference and on the desktop. The advantages of something similar to new user the advantages of Linux Mint with Mate; yet combined and being actually Debian proper. Its mother.

The goal is to hit the ground running and yet still be Debian stable. Choices (initially) made. Speed for time saving.

Mainly; most folks think any OS should magically appear installed with perfection. This is because they can buy a closed system already OS installed. Completely overlooking the incompleteness of new bought, closed systems. ...Completely overlooking the greater customization, upgrade-ability, real security and ongoing progression of Debian. Not realizing there's a native, open program of a different name; to do the job and far better. Almost invariably within the easier, far most advanced, seamless app, quick installation and removal, total built-in package management system. The stable Debian and its back-ports repositories are the place to be.

For the new explorers:

1. You don't have to REPLACE your current stuff. Try Deb stable on a new inexpensive SSD.

2. Get open hardware devices and learn how to check them first. (Site links?)

3. Use only the 'recommended' hardware requirements (not your older slow ones). However the recommended (not absolute minimum) hardware still starts at a very low cost. Free software savings offset any hardware costs greatly.

4. Access starter web pages on how to roll your Deb stable; into something like Linux Mint. Great for trial (if you've never seen); but you might as well go Debian.

a) Besides Debian is a tools box for the many ways to run (Desktop managers etc...); Debian is best installed in slightly different ways depending on the newest release, what you want, and how you want it to do it. For example; sometimes the ISO disk 1 installer is all you need. Else the a select Live Debian ISO might be best.

b) The network installer is efficient; but new users will have an easier time with a full disk 1 or Deb Live ISO put onto a good USB stick PROPERLY.

c) Never stop working around anti-competition ROAD BLOCKS like just turn OFF (in-)secure boot. It's a fight; so be a fighter or quit.

5. Learn how to navigate 'road block' problems, on-line, 24/7 with Debian stable for the desktop/laptop. Done once(hard) and then you know(easy). Plus, why Debian is this way (building blocks).

Try searching 'Debian', 'wiki' and your general subject; in one search.

Debian stable and its back-ports are not just for servers. Deb "testing" is best for developers/bug reporters. Stable is for easy, daily upgrades(LESS TIME), a longer (about 2 years) release, then functional and smooth (unlike most) release tier upgrades with exemplary DYNAMIC SECURITY upgrades. The absolute best foundation (for any work) and the most flexible OS of anything. Universal!
Last edited by neodeb on 2016-05-21 17:47, edited 3 times in total.
Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-05-02 20:47

As to the Error and trouble Google is having.....(I read they are redoing the key to not use SHA)
gpg --keyserver --recv-keys 1397BC53640DB551

gpg --export --armor 1397BC53640DB551 | sudo sh -c 'cat >> /usr/lib/pepperflashplugin-nonfree/pubkey-google.txt'

...will temporarily allow Pepper to install and upgrade

Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-05-13 23:13

As it happens; this script and it's ability to make upgrading Debian (stable) and Pepper (at the same time) easy, has been instrumental in avoiding the Abode Flash zero-day UNPATCHED exploits (again) for May 10th to the 12th. It automatically patched it on the 12th(yesterday; the day it made big news and that's rare). It was just patched and before Adobe even updated their chart of what is current; on their checker. They upgraded that list now too.

This does not mean there are no new exploits right now. We just don't know them yet. The point is to keep as current as possible and this is how; but the situation is grim. Do not use it in normal course of business. Only as last resort and in another browser for non-critical needs. Please write any left over, offending web pages. It makes a good difference.

Today the script is working good. In the near future we will not mess with Flash at all and do other things in scripts.

Hope that helps someone.
Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-05-21 17:26

Now, the pepper upgrade threw an invalid Debian package error; so watch it.

Purge and reinstall the pepper plug-in, then also do the key fix lines and do the upgrade (Launch the upgrade script above) again. That fixed it for me.
sudo apt-get purge pepperflashplugin-nonfree && sudo apt-get install pepperflashplugin-nonfree
gpg --keyserver --recv-keys 1397BC53640DB551
gpg --export --armor 1397BC53640DB551 | sudo sh -c 'cat >> /usr/lib/pepperflashplugin-nonfree/pubkey-google.txt'

...and upgrade.
Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-06-16 06:40

I give up on Pepper and waiting on Google to fix SHA issues. I don't have time for this. Bye Chromium, Pepper and the lines to do Pepper update in this script.

If switching to a fake Safari browser identifier by Firefox plug-in does not play the video (BBC) then I will not use the (crap) web site!

I guess Google can't keep up.
Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-10-14 23:22

Things to do:

Now all we need is added script code that will check if the Internet is up before the upgrade script continues; because if the net is down it wrongly says you have a bunch of upgrades and Y/N. If you go Y or automate it to Y then that could cause problems. Better it would say something like "NET IS DOWN" and pause until it's up.

I issue the challenge.

P.S. The Pepper upgrade automation SOMETIMES works. Stable has a minor bug fix pending. Rumor has it that we may be able to get Pepper without downloading entire Chrome soon (I use it with Chromium for Flash crap).
Open is freedom.
Posts: 90
Joined: 2007-08-09 02:49

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 6 guests