seeking notification (or show onscreen) NN updated packages are available

Forum Forums New users New Users and General Questions seeking notification (or show onscreen) NN updated packages are available

This topic contains 9 replies, has 4 voices, and was last updated by skidoo Jan 13-2:49 pm.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #5062
    Member
    wasp
    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: )
    Thanks

    • This topic was modified 6 months, 1 week ago by skidoo. Reason: clarified the topic title (was "Update notification")
    #5067
    Forum Admin
    Dave
    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

    #5089
    Member
    wasp
    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?
    Thanks

    #5108
    Member

    skidoo

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

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

    #5110
    Member
    wasp
    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!

    #5118
    Member
    caprea
    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} Updates

    If 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 6 months, 1 week ago by caprea.
    • This reply was modified 6 months, 1 week ago by caprea.
    #5141
    Member
    wasp
    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} Updates

    If 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! 🙂

    #5143
    Forum Admin
    Dave
    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

    #5145
    Member
    wasp
    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 … 🙂 🙂
    Thanks

    #5162
    Member

    skidoo

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

    The 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.
    1.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.