A way to display updates status in the conky

Forum Forums General Software A way to display updates status in the conky

  • This topic has 47 replies, 10 voices, and was last updated Apr 21-11:50 pm by BobC.
Viewing 15 posts - 16 through 30 (of 48 total)
  • Author
    Posts
  • #32939
    Anonymous
      Helpful
      Up
      0
      ::

      Wow, nice work!

      As a Linux’er I grew up with the terminal and often don’t understand why you have to put everything in GUI like M$, which is so error-prone.
      MX does the same, everything is put into a GUI and even that is something windozers often don’t know how to do. By the way, it seems to me that antiX is also on the way to achieve this…

      To display the update notification in Conky there are many possibilities. Personally I like simplicity. Therefore Conky does it alone. With the command line at the bottom of the Conky, that’s done.

      ${color8}${alignc}${execi 3600 aptitude search "~U" | wc -l}${color} Updates
      

      This requires the installation of the terminal-based package manager “Aptitude”. apt show aptitude

      Have fun.

      #32943
      Member
      PPC
        Helpful
        Up
        0
        ::

        Hi, Male – nice info, always good knowing new ways to do stuff!

        Off topic- very nice wallpaper!… Also, about the “GUI” craze- the new GUI antiX updater already rolled out – I’m partly to blame for that, because I’m prone to try to find/script GUI’s for doing essential stuff- in part for 2 reasons- I’m lazy, I would rather click a icon to check for updates than using the terminal… And, most important – there are literally millions of Linux users that don’t really know how to use the terminal for doing even the most basic tasks, like updating and upgrading. Adding about 1 kb of code so those users can use antiX and have it up to date does not seem like a bad trade of to me, but I respect opinions different from mine…

        P.

        EDIT: sorry, did you mean “aptitude”?

        • This reply was modified 3 years, 2 months ago by PPC.
        #32947
        Moderator
        christophe
          Helpful
          Up
          0
          ::

          male, I think that is fabulous!

          I see now that aptitude search "~U" searches for all packages that are installed and can be upgraded. Do I need to run the apt update first?

          confirmed antiX frugaler, since 2019

          #32949
          Moderator
          BobC
            Helpful
            Up
            0
            ::

            Male, that’s much better, I admit, but how did you know there was a “~U” option?

            #32954
            Anonymous
              Helpful
              Up
              0
              ::

              EDIT: sorry, did you mean “aptitude”?

              That is correct. I didn’t see the typos. I’m getting old, sorry. “Aptitude” and apt show aptitude

              Do I need to run the apt update first?

              No.
              As you can see, 22 updates were available at boot time (2020-02-21 11:45).
              When I do the update right away, Conky shows me the number 0 one hour later (1h=60minutes=3600seconds).

              but how did you know there was a “~U” option?

              aptitude –help or man aptitude

              #32955
              Moderator
              BobC
                Helpful
                Up
                0
                ::

                On the man page they show the “~N” for new packages, but I found the reference manual and there are many more options.

                https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html

                It runs very quickly.

                Thanks again…

                #32961
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  The cron job would run, but I found from the log that it couldn’t access the display. I found a solution at:

                  https://unix.stackexchange.com/questions/118811/why-cant-i-run-gui-apps-from-root-no-protocol-specified

                  In the terminal as regular user I had to type:
                  xhost si:localuser:root

                  In order to get it to run the updater on Saturday night at 11:51 pm I needed to add a line to root’s crontab:
                  sudo crontab -u root -e

                  The line I added was:
                  51 19 * * 6 env DISPLAY=:0.0 /usr/local/bin/antiX-updater.sh

                  Then display it to make sure it’s set:
                  sudo crontab -u root -l

                  I need to think more about how I want this to work. I was hoping it would pop up if updates were available and ask me if I wanted to update, but it took off running and went till the Update y/n prompt, I typed a Y, then 45 minutes later it started asking about replacing individual files, etc.

                  For me, I guess its fine that way, not sure about a kid that doesn’t know anything about linux…

                  #32974
                  Moderator
                  christophe
                    Helpful
                    Up
                    0
                    ::

                    For me, I guess its fine that way, not sure about a kid that doesn’t know anything about linux…

                    They will just click the antiX Updater launcher in the menu. 🙂

                    Cron-conky-updater is fun for us, but I don’t think antiX is the place for MX-style “user-friendliness” OOTB.

                    IMO, sometimes you have to first know you want something, before you appreciate having it: I think only people who want to learn & add it will enjoy this type of thing.

                    confirmed antiX frugaler, since 2019

                    #32977
                    Moderator
                    christophe
                      Helpful
                      Up
                      0
                      ::

                      That all being said….

                      I use this formula, and it works very well:

                      1. use cron to run apt update every hour (see earlier in this thread).
                      2. install aptitude (sudo apt install aptitude).
                      3. add line at end in ~/.conkyrc to run the aptitude search line every 10 minutes:
                      ${color}${alignc}${execi 600 aptitude search "~U" | wc -l}${color} Upgrades available

                      This will run update check & display the info in conky. Then the user can click the antiX-Updater icon when conky says upgrades are available.

                      SO… if/when someone who doesn’t know anything starts to poke around & explore his/her environment, this may be something they may want to use to play/customize. What “recipe” do you (all) use ?

                      confirmed antiX frugaler, since 2019

                      #32978
                      Moderator
                      Brian Masinick
                        Helpful
                        Up
                        0
                        ::

                        First, I will make a statement: I believe in choice. That’s what the whole free software movement is about, choice, freedom of choice, including the choice to make the software yourself, obtain source or binary versions of freely available software, to pay for customized and corporately supported software (the Red Hat model, for example) or the choice to purchase and use proprietary and commercial software. Each of these choices have their own specific costs and benefits.

                        From the standpoint of antiX, I believe that the owner and the development team has the right to build what they want. Each of us have the choice to use it as is or modify it to suit our specific needs.

                        If we’d like additional features we can request them to be included and the team can choose to honor the request or decline it based on time, priority and the principles of the product and release.

                        I personally think that we have a very good product now. It can be changed and improved, yet it’s very good as is.

                        Moreover the antiX and MX variations provide a very good set of alternatives. I am pleased that individuals are building, discussing and sharing additional comments and tools.

                        It remains the choice of each person to use what works best for their own needs.

                        --
                        Brian Masinick

                        #32980
                        Moderator
                        christophe
                          Helpful
                          Up
                          0
                          ::

                          Moreover the antiX and MX variations provide a very good set of alternatives. I am pleased that individuals are building, discussing and sharing additional comments and tools.

                          It remains the choice of each person to use what works best for their own needs.

                          Agreed.

                          And to clarify my recent posts above, my “recipe” query is so that people searching can find the exact steps to follow for whichever setup they are looking to achieve. I know that, if I am out of my depth on something new (which is quite often), I appreciate step-by-step aids.

                          confirmed antiX frugaler, since 2019

                          #32993
                          Moderator
                          BobC
                            Helpful
                            Up
                            0
                            ::

                            I definitely think the innovation of installing aptitude and displaying the updates availabe as part of the conky display is a good idea.

                            Once I got past the root conky issue, I took Brian’s modified version of PPC’s code and added having it check for updates, and if any, ask me if I want to just install them or backup via LuckyBackup or ISO-Snapshot, and then do the install, on a weekly basis, which should be good enough for my systems.

                            To each his own I suppose.

                            I would like to create bulletproof installable packages, be it via github or gitlab or via .deb or install shell script, but I guess that’s for another day. I need to learn one thing at a time and build on them.

                            #32995
                            Member
                            ex_Koo
                              Helpful
                              Up
                              0
                              ::

                              Why not ask MX how their apt-notifier checks for updated and add this method to conky. But the trouble you will have is the counter resetting to zero after the update. Which has been pointed out from above.

                              The best method I have seen of this working is with polybar. But I can’t find one for Debian repo’s only arch.
                              polybar update checker

                              #32996
                              Anonymous
                                Helpful
                                Up
                                0
                                ::

                                Why not ask MX how their apt-notifier checks for updated and add this method to conky.

                                Did it escape your attention that Anti published an update checker for antiX with the beginning of this thread?
                                https://antixlinux.com/package-updates-notifier/
                                https://www.antixforum.com/forums/topic/apt-notifier/
                                What does this method look like in MX for Conky?

                                But the trouble you will have is the counter resetting to zero after the update.

                                I’m sorry, Koo, for that statement. You have no idea. I apologize if I misunderstood.

                                #32999
                                Member
                                PPC
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Did it escape your attention that Anti published an update checker for antiX with the beginning of this thread?

                                  Hi, Male- Bob developed the Conky update notifier using what were beta versions of what is now “antix Updater” – my initial version (PPC’s) and Brian Masinick’s alternate version- so, unless Bob recently changed something, he’s already using it…

                                  P.

                                Viewing 15 posts - 16 through 30 (of 48 total)
                                • You must be logged in to reply to this topic.