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).
Addendum: For stretch:
deb stretch non-free contrib main
deb stretch-updates non-free contrib main
deb stretch/updates non-free contrib main
deb stretch-backports non-free contrib main

## For getting libdvdcss2 (Enable line below, run key install below, update, upgrade, install it and then comment it out again.)
# deb /

Non-Gnome3 users issue:
sudo apt-get purge update-notifier && sudo 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).

General Reminder: Check any problems with browser add-ons as disabled to avoid conflicts. (Like Google Disconnect and web video.)
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.

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)....

Last edited by neodeb on 2017-08-22 18:43, edited 70 times in total.
Open is freedom.
Posts: 120
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 2017-07-04 17:54, edited 5 times in total.
Open is freedom.
Posts: 120
Joined: 2007-08-09 02:49

Re: HOWTO: Fast terminal upgrade by quick launcher icon

Postby neodeb » 2016-05-02 20:47

I removed the Flash updating stuff. Flash is dead.
Last edited by neodeb on 2017-07-04 17:55, edited 1 time in total.
Open is freedom.
Posts: 120
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: 120
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: 120
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: 120
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).

Now I use actual Chrome and very rarely and to test (bad sites); only for if Flash is the comparative problem. Netflix could work their with Debian for example. I note a greater effort (excessive pop ups) trying to hack those still using flash then. Also Opera can be used (as a rare backup and checking browser) and it has a VPN built-in; if you turn it on. I use mainly Firefox as safer with no Flash and I have switched to Mozilla's main-line version; that upgrades itself independently. Check its "about" menu to be sure.
Open is freedom.
Posts: 120
Joined: 2007-08-09 02:49

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 9 guests