Page 1 of 1

MX updater query

Posted: Sun Mar 17, 2024 8:52 pm
by compass
OK, I've been logged in to this install of MX LInux for approaching three hours now.

I notice that the MX Updater icon is showing my that I do not have updates.

But when I then OMB (other mouse button) click on the icon, and select "Check for Updates" I see that four updates are available.

Many times, when I use this laptop, the usage is brief, i.e., about an hour or so.

How do I configure the MX Updater to automagically check for updates for a certain tim eperiod after I log on to this laptop, and not have it wait until I need to actively query it about whether or not updates are available?

Is there a config option to ~check for updates~ after a certain time period after I log on?

Re: MX updater query

Posted: Sun Mar 17, 2024 9:45 pm
by artytux
Looking up the
MX Manual
3.2.1 MX Updater (former Apt-Notifier) This versatile applet (Xfce only, KDE uses Discover) sits in the Notification Area where it notifies you when packages are available. Be sure to check the important options available through the context (right-click) menu. If it doesn’t appear, launch MX Updater to refresh. Xfce only, KDE uses Discover.
-----------------------
Since you have no info on about you installed Xfce or if KDE desktop anyway I don't stress about updates since this isn't a rolling distro usually do updates once a week, too easy, the other computer gets checked for updates only when it's online and that's just for updating that's not very often, the games played and that's very often, that's why I don't use notifs just update to the schedule just described .

Re: MX updater query

Posted: Sun Mar 17, 2024 9:58 pm
by compass
> Since you have no info on about you installed Xfce or if KDE desktop anyway

Apologies for that.

This install is Xfce.


> I don't stress about updates

Yeah, I do, because updates of installed apps (browser!) often mitigate security issues.

That is why I care about updates.

So, going back to my original query...

Is there an option to tell the MX Updater to check for u[dates after a certain time period since I've logged on?

Thanks for your reply.

Re: MX updater query

Posted: Sun Mar 17, 2024 10:30 pm
by artytux
'Yeah, I do, because updates of installed apps (browser!) often mitigate security issues.'
Fair enough too

How would I go about this is well you wrote that
'But when I then OMB (other mouse button) click on the icon, and select "Check for Updates" I see that four updates are available.'

I would check for updates soon after I had the computer up and running online and not wait for a notif then after done updates feel OK knowing the browser and any other updates are up to date,
sometimes it's easier on the system (you not the computer) to do it yourself and not rely notifs and automation especially when anything revolves around online security.

For peace of mind that is it . :snoopy1:

Just an idea have ever thought about using the terminal for updates.

Re: MX updater query  [Solved]

Posted: Sun Mar 17, 2024 10:36 pm
by FullScale4Me
Right click MX Updater icon and select Preferences. At the very bottom is 'start MX Updater at login'.

Re: MX updater query

Posted: Sun Mar 17, 2024 11:41 pm
by compass
> At the very bottom is 'start MX Updater at login'.

Thanks for your reply.

That option is checked.

My question is not whether or not MX Updater has been started.

My question is -- how can I determine/configure how long it waits after I log-in before it decides to tell me about available updates.

Re: MX updater query

Posted: Sun Mar 17, 2024 11:47 pm
by compass
artytux wrote: Sun Mar 17, 2024 10:30 pm I would check for updates soon after I had the computer up and running online and not wait for a notif ...
Yeah, there's that aspect.

But I have a different view of computers.

I think that a computer should be able to do routine things and not require a user of the computer to do mundane tasks that can be scheduled.

I do admit that I may have a different view. than the view you seem to hold.

If so, please explain the apparent need for /etc/cron and all the associated directories.

thx.

Re: MX updater query

Posted: Sun Mar 17, 2024 11:58 pm
by MXRobo
Started before post #6
In MX-21.3 Xfce, 'start MX Updater at login' is/was checked by default, but I think the OP wants to know if the actual checking for update time-after-login or boot can be set. You could change this in many Xfce distros, but it's not readily available in MX. Something like check for updates 10 minutes after login, etc.

https://easylinuxtipsproject.blogspot.c ... pdate.html
#4 "Consider increasing the interval for checking for new updates"

MX must be different, and may use crontabs, anacrons, cronjobs or something.

Users Manual references:
https://mxlinux.org/wiki/help-files/hel ... -notifier/
and
~/.config/MX-Linux/apt-notifier.conf
which references:
/usr/share/apt-notifier/conf/apt-notifier.conf.d/01_apt-notifier.conf

Not sure where the defaults end, or what to actually adjust, did see

Probably not what you want, but:

To slow down the frequency of checking, change theAPT::Periodic::Update-Package-Lists setting in the /etc/apt/apt.conf.d/02periodic file from a “1” to a “7”, and keep the apt cron job in the cron.daily folder.

Quickly web searched apt-notifier how to adjust time, no luck.
https://www.forum.mxlinux.org/viewtopic ... 33#p564233
Good Luck!

Re: MX updater query

Posted: Mon Mar 18, 2024 12:14 am
by DukeComposed
compass wrote: Sun Mar 17, 2024 11:47 pm
artytux wrote: Sun Mar 17, 2024 10:30 pm I would check for updates soon after I had the computer up and running online and not wait for a notif ...
Yeah, there's that aspect.

But I have a different view of computers.

I think that a computer should be able to do routine things and not require a user of the computer to do mundane tasks that can be scheduled.

I do admit that I may have a different view. than the view you seem to hold.

If so, please explain the apparent need for /etc/cron and all the associated directories.

thx.
MX Updater already sets a timer to check for updates approximately once every minute. It skips most of these checks if the files it watches for updates haven't been changed and if the user hasn't instantiated the check. If you want to force updates to occur shortly after you login, run "apt-get update" shortly after you log in.

As for cron: if you expect computers to be able to do mundane tasks on a schedule, how do you think they know what a schedule is?

Re: MX updater query

Posted: Mon Mar 18, 2024 12:54 am
by compass
> MX Updater already sets a timer to check for updates approximately once every minute.

If that is the case, then why do I not see the "updates available" icon rendition unless and until I specifically click on the "Check for Update" menu option?

What you say occurs is what I would like to see occur.

So, where is the discrepancy?

Re: MX updater query

Posted: Mon Mar 18, 2024 1:00 am
by compass
> In MX-21.3 Xfce, 'start MX Updater at login' is/was checked by default, but I think the OP wants to know if the actual checking for update time-after-login or boot can be set. You could change this in many Xfce distros, but it's not readily available in MX. Something like check for updates 10 minutes after login, etc.

Bingo.

Many thanks for taking the time to understand my concern.


> but it's not readily available in MX. Something like check for updates 10 minutes after login, etc.

At the risk of repetition...

Yes!!!

I would want to tell MX to check for updates after I have been logged in for ~whatever reasonable ~ time period. I do not want to, or see the need to, manually check for those updates.

In my view, that is what computers are for. To automate mundane tasks.

Thank-you for recognizing that aspect of this.

Re: MX updater query

Posted: Mon Mar 18, 2024 1:04 am
by compass
And, if I may ask,

Why is this thread marked "Solved" ?

MX updater query [Solved]by compass » Mon Mar 18, 2024 1:00 am » in MX Help

Re: MX updater query

Posted: Mon Mar 18, 2024 1:23 am
by DukeComposed
compass wrote: Mon Mar 18, 2024 12:54 am > MX Updater already sets a timer to check for updates approximately once every minute.

If that is the case, then why do I not see the "updates available" icon rendition unless and until I specifically click on the "Check for Update" menu option?
"It skips most of these checks if the files it watches for updates haven't been changed and if the user hasn't instantiated the check." I literally explained that.

You're confusing MX Updater, a notification utility, with apt-get or Synaptic, which fetches package information from repositories.

Re: MX updater query

Posted: Mon Mar 18, 2024 3:18 am
by compass
> You're confusing MX Updater, a notification utility, with apt-get or Synaptic, which fetches package information from repositories.

Am I?

In my view, I am not making that erroneous conflation.

Indeed, I have stated that MX Updater did not notify me when updates were available.

Notice the phrasing, "MX Updater did not notify me when updates were available."


Notify me if updates are available.

To state my concern once again....

The MX Updater icon does not show when updates are available. But If I OMB click on the icon and select "Check for Updates" I see that updates are available.

Why do I have to manually check for updates via MX Updater? <--- my main question.

Why can I not configure MX Updater to check automagically for updates after a reasonable period after I log on to the laptop?

thx.

Re: MX updater query

Posted: Mon Mar 18, 2024 3:21 am
by compass
And, btw,

I just asked MX Updater to Check for Updates.

Guess what, it tells me that updates are available.

I've been logged on to the laptop for, how many hours this evening, 5, 6?

But MX Updater did not tell me about available updtaes until I just asked it to check?

Yeah, that's wrong on a couple of levels.

Re: MX updater query

Posted: Mon Mar 18, 2024 4:03 am
by FullScale4Me
Right clicking MX Updater icon in Taskbar gives:
HELP: MX Apt-notifier wrote: MX-Updater (formerly called apt-notifier) checks the repos to look for package updates. A cronjob (a scheduled task using cron) does a check at a random time between 5 and 35 minutes after bootup if it’s been more than 24 hours since the last check. If the machine is then left running continuously, the cronjob runs again at 07:35 AM daily and rechecks (also at a random time between 5 and 35 minutes after the cronjob start).
To get it to do something different requires modifying the cronjobs.

Re: MX updater query

Posted: Mon Mar 18, 2024 4:48 am
by Stuart_M
I believe the frequency that MX Updater will check for updates (more than the default of only once per day) can be changed, as well as how soon it will check for updates after logging in, which is once per day (default is a random 30 minutes or so). My thoughts:
compass wrote: Sun Mar 17, 2024 11:41 pm ...
My question is -- how can I determine/configure how long it waits after I log-in before it decides to tell me about available updates.
I've read and re-read this thread several times and I think the below may answer your question and give some insight on how it would be done...I said "I think" because I have not tested nor studied the below very much. It is based on what I use, MX-19 Xfce, and is probably the same as MX-23 Xfce.

The MX Updater (apt-notifier) by default will automatically run once and only once per day (of course you can manually run it anytime you want). I don't believe it makes this check for multiple log-in sessions in one calendar day (I base this only on my own experience in MX-19). The automatic check for updates occurs randomly, after about 30 minutes from logging in on a new day.

I think the script that determines that random time (around 30 minutes) is located in /etc/cron.daily/apt-compat. In the apt-compat file, go to line 35 and you will see "RandomSleep=1800" (30 minutes). Line 49 is "random_sleep" so I would imagine commenting that line out would remove the randomness. I think changing the "RandomeSleep" value to something other than 1800 seconds will adjust when MX Updater will automatically check for updates.

Based on your other posts I got the feeling that you also wanted the ability to adjust the frequency of this automatic check. Maybe more often that only once per day?

One thing in the apt-compat file that appears to affect the frequency of checking for updates would seem to be the last lines (lines 54-55) that identifies the script to be run daily. If you want it to automatically run more often then I presume it would have to be set to run on some hourly schedule, but I don't know how that would be done. Maybe change the last line from "exec /usr/lib/apt/apt.systemd.daily" to "exec /usr/lib/apt/apt.systemd.hourly", and then move the apt-compat file from /etc/cron.daily/ to /etc/cron.hourly/?? It has been said that just moving the apt cron job (I presume the apt-compat file) to the cron.hourly/ file does not work, at least in MX-18 (viewtopic.php?p=499357#p499357 - relevant portion quoted below).
I've never tried moving the apt cron job from cron.daily to cron.weekly to get it to update less frequently, I know moving the apt cron job to cron.hourly doesn't work if you want it to update more frequently.
Another possibility may be to create a cron job that will run whatever is used to manually run the MX Updater, whatever that command or script is.

Re: MX updater query

Posted: Mon Mar 18, 2024 7:23 am
by DukeComposed
compass wrote: Mon Mar 18, 2024 3:18 am > You're confusing MX Updater, a notification utility, with apt-get or Synaptic, which fetches package information from repositories.

Am I?

In my view, I am not making that erroneous conflation.
You are. As FullScale4Me points out, MX Updater used to be called apt-notifier, and as I've pointed out, the source code repository. still calls it that.
compass wrote: Mon Mar 18, 2024 3:18 am > You'reIndeed, I have stated that MX Updater did not notify me when updates were available.

Notice the phrasing, "MX Updater did not notify me when updates were available."
Noted. Duly.

apt-notifier notifies. We've all seen it happen. What you're upset about is that it doesn't perform the equivalent of "apt-get update" immediately upon system startup. It checks for updates at a frequency suitable for most users and which minimizes load spikes or thundering herd problems. You can force your system to check more often or at regular intervals. You can automate this with cron. But it's not built to do this on purpose and it never will be.

If you want to patch your machine every ten minutes, consider running Arch.

Re: MX updater query

Posted: Mon Mar 18, 2024 9:25 am
by MXRobo
I'll admit that I don't know how this works but patching your machine every ten minutes may be a bit of a strawman as I don't think that the OP is too concerned with how OFTEN it checks for updates but is concerned with the time after login that it checks for updates. But as has been pointed out, "To get it to do something different requires modifying the cronjobs." and I'm not sure that the frequency will help.

I'm not - and can't – offering much help, so Good Luck!

Re: MX updater query

Posted: Mon Mar 18, 2024 9:43 am
by artytux
@compass
If so, please explain the apparent need for /etc/cron and all the associated directories.

OK i'm not mention cron OR someone alse not me, so please you explain where you got cron from from me , what I did write because I would like to know.

Re: MX updater query

Posted: Mon Mar 18, 2024 10:01 am
by DukeComposed
MXRobo wrote: Mon Mar 18, 2024 9:25 am I'll admit that I don't know how this works but patching your machine every ten minutes may be a bit of a strawman
Clearly you've never run Arch.

Re: MX updater query

Posted: Mon Mar 18, 2024 12:13 pm
by MXRobo
My point was not Arch, but patching your machine every ten minutes.
Clearly you've never "ran" logical fallacies. Last comment.

Re: MX updater query

Posted: Mon Mar 18, 2024 1:25 pm
by FullScale4Me
During installation the user is given the opportunity to disable many system services.

Has the OP verified with MX Service Manager that the cron service is actually running?

Re: MX updater query

Posted: Mon Mar 18, 2024 4:45 pm
by Eadwine Rose
*has fish ready, slapping it in the other hand for now*