A Better Way to Get Your Updates Done in Ubuntu
Posted: Sat Oct 03, 2015 5:44 pm
This may apply equally well to other distros of Linux. Or you may have to make minor changes to fit what you have.
The "Better Way" is a simple script file that you run routinely, like once a day or a couple of times a week. I save it as a file on my Desktop with the name "Update". mark it for execution, then double click on it to execute it. Now the default configuration for Ubuntu does not run scripts from the Desktop when you try this, so you can either enable this feature or call it from a terminal window. There is a way I found for enabling scripts to be "Run in terminal, Display, or Run", or an individual sefault selection, but how I did this slips my mind for the moment.
The last line goes hand-in-glove with the bash locate command, which gets better results than the find command does most of the time. I only learned about locate recently.
I found what I was missing as to enabling the running of scripts off the Desktop. You see and access everything by the file manager, which is named Nautilus. In the far right corner of Nautilus you will see a gearbox symbol, and if you click on that, You will see Preferences. Click on the Behavior tab and pick your box under Executable Text Files. I chose Ask, as the Display option actually opens gedit, so you can modify the script if you want.
The "Better Way" is a simple script file that you run routinely, like once a day or a couple of times a week. I save it as a file on my Desktop with the name "Update". mark it for execution, then double click on it to execute it. Now the default configuration for Ubuntu does not run scripts from the Desktop when you try this, so you can either enable this feature or call it from a terminal window. There is a way I found for enabling scripts to be "Run in terminal, Display, or Run", or an individual sefault selection, but how I did this slips my mind for the moment.
Code: Select all
#!/bin/sh
echo "\n\n\n"
echo " SOFTWARE UPDATE SCRIPT"
echo " This will take several minutes to complete."
echo " To see all the action, remove the '-qq's from script."
printf " "
sudo apt-get -qq update
sudo apt-get -qq -y dist-upgrade
sudo apt-get -qq -y autoremove
sudo /usr/bin/update-manager
sudo updatedbI found what I was missing as to enabling the running of scripts off the Desktop. You see and access everything by the file manager, which is named Nautilus. In the far right corner of Nautilus you will see a gearbox symbol, and if you click on that, You will see Preferences. Click on the Behavior tab and pick your box under Executable Text Files. I chose Ask, as the Display option actually opens gedit, so you can modify the script if you want.