Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run Ubuntu 12.04 and if the computer is started in console mode I get a notification of available updates when I log in. Is there a way to get this notification to show up in a (GUI) terminal window? What do I need to add to ~/.bashrc?

share|improve this question
add comment

2 Answers

The message that you see is from a package called motd aka message of the day from ubuntu. There are files that can be modified to remove update notification, as well as put new welcome messages, run scripts that will fetch various information to display.

Take a look at this article on how to customize it.

share|improve this answer
    
OK, thanks, /usr/lib/update-notifier/update-motd-updates-available is the command I'm looking for. However, it can't be run as non-root as it creates a file in /var/lib/update-notifier. As far as I know you should be able to check for new updates without being root. –  August Karlstrom Sep 19 '12 at 14:26
add comment
up vote 0 down vote accepted

There is a command called apt-check. The following Bash script displays the number of updates if there are any:

updates=$(/usr/lib/update-notifier/apt-check --human-readable)
if [ ${updates:0:1} != 0 ]; then
   echo -e "$updates"
fi
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.