Forum › Forums › New users › New Users and General Questions › seeking notification (or show onscreen) NN updated packages are available
- This topic has 9 replies, 4 voices, and was last updated Jan 13-2:49 pm by Anonymous.
-
AuthorPosts
-
January 12, 2018 at 1:42 am #5062Member
wasp
Hi, is there a program (which is not a debian pk-update icon that takes up a lot of resources), to notify updates? I try conky scripts but they need to change sudo permissions … and I do not like it: )
ThanksJanuary 12, 2018 at 5:35 am #5067Forum Admin
Dave
::Run a cron job that runs apt-get to query how many packages are available for update and outputs that to a file. Then have a line in conky to read that file. You can make it fancy by changing the color of the line if there are more than 0 packages available.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
January 12, 2018 at 10:44 am #5089Member
wasp
::Run a cron job that runs apt-get to query how many packages are available for update and outputs that to a file. Then have a line in conky to read that file. You can make it fancy by changing the color of the line if there are more than 0 packages available.
Is there a guide for all this?
ThanksJanuary 12, 2018 at 2:43 pm #5108Anonymous
::Is there a guide for all this?
No. It’s a suggestion toward crafting a solution, in case you are sufficiently motivated to do so.
IMO, a goal of “displaying in conky” is not “worth the setup hassle” involved, but hey it might be a fun project for ya..
This command will perform a check and (just) return the count ( e.g. 0, or 72)
sudo apt-get -s upgrade | grep "upgraded," | grep -o "^\S*"You might create a my_checker_counter_thingie.sh script, to be placed in /etc/cron.daily/
#!/bin/bash echo "0" > /home/upgradecount_for_conky.txt apt-get -s upgrade | grep "upgraded," | grep -o "^\S*" > /home/upgradecount_for_conky.txtand edit your conky config to read the value from that counter file, but…
for a fully working solution, it’s up to you to ensure that cron is running (is autostarted) on your system
and you’ll need to consider (handle) any “whatifs” e.g.What if the machine is not running at the time designated in crontab?
(please, don’t attempt to check hourly as a workaround)What if no network connection is available (or server connection fails) when task runs?
(note: as is, the “my_checker_counter_thingie.sh” code, above, would stall/hang in that scenario)January 12, 2018 at 2:59 pm #5110Member
wasp
::What if no network connection is available (or server connection fails) when task runs?
(note: as is, the “my_checker_counter_thingie.sh” code, above, would stall/hang in that scenario)Clear … I think I will lose … 🙂 🙂
At the bottom of the terminal has its charm … 🙂Thanks!
January 12, 2018 at 3:49 pm #5118Moderator
caprea
::Simple one, but you have to install aptitude
Just one line to put at the end of .conkyrc
${execi 1800 aptitude search "~U" | wc -l} UpdatesIf you dont like it, or doesnt work as expected just outcommend or delete it.
The 1800 are seconds, you can change it easily.
Anyway, it still prepupposes an update.
And so we are back to the scripts and cron job.- This reply was modified 5 years, 3 months ago by caprea.
- This reply was modified 5 years, 3 months ago by caprea.
January 13, 2018 at 7:27 am #5141Member
wasp
::Simple one, but you have to install aptitude
Just one line to put at the end of .conkyrc
${execi 1800 aptitude search "~U" | wc -l} UpdatesIf you dont like it, or doesnt work as expected just outcommend or delete it.
The 1800 are seconds, you can change it easily.
Anyway, it still prepupposes an update.
And so we are back to the scripts and cron job.Thanks! 🙂
January 13, 2018 at 7:44 am #5143Forum Admin
Dave
::Polling for updates every half hour! Yikes. Maybe if you are running sid where it is possible to change that frequently….
Might be better to do an exec line instead so it checks when conky starts…
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
January 13, 2018 at 7:54 am #5145Member
wasp
::Polling for updates every half hour! Yikes. Maybe if you are running sid where it is possible to change that frequently….
Might be better to do an exec line instead so it checks when conky starts…
Yes, in fact, I changed every 10 hours, having the PC always on … 🙂 🙂
ThanksJanuary 13, 2018 at 2:49 pm #5162Anonymous
::FWIW:
MX Linux provides an autostarted “MX Updater” widget ( package name: “apt-notifier” ) which runs within the context of XFCE tray.
This widget could possibly be re-purposed (repackaged) for use in other environments (and for use with non-MX package repositories)..
v— in case you care to DIY a similar cron -enabled, autostarted tool, here are some files of interest (can view at github):/etc/apt/apt.conf.d/periodic-update /etc/cron.daily/quick-live-update /etc/xdg/autostart/mx-updater-autostart-xdg.desktopThe tray icon changes color when one or more updated packages are available and, IIRC, a tooltip displays the NN count when hovered by mouse cursor.
Left-click opens an updater utility (or, can be configured to launch synaptic package manager?); right-click opens a preferences UI.
. -
AuthorPosts
- You must be logged in to reply to this topic.