I've been using XFCE in Debian Testing for a few weeks, so of course there have been a lot of updates - mostly bug fixes at this stage of the cycle. I've been updating manually every day to keep up to date and watch for fixes for any issues I have.
But when Bullseye becomes Stable, how will I know if updates are available? Updates in Stable are less frequent, so it's good to get a notification if they are available.
Unlike in Gnome, update notifications don't seem to happen in XFCE in Debian. However, there are ways to be notified of updates. One way is to install package-update-indicator, which basically installs the Gnome update system, with, it's own pop-up indicator.
However, there is a way to get notifications without installing the Gnome system, if we simply want to be notified of updates. (The Gnome system can install updates, automatically in the background if so configured.)
Here's how.
The first step is to enable the system to update its list of available packages so it knows if there are newer packages available. Manually, this would be done by this command:
#apt-get update
Fortunately in Bullseye, there is a way to get APT to update itself automatically. Systemd runs a system scheduler which contains a timer called (with admirable succinctness):
apt-daily.timer
This timer runs by default, but the default APT setting is to do nothing. We need to configure Apt to update its packages daily when its script is run by the timer.
This is done by creating a configuration file and adding some variables. The configuration file needs to be:
/etc/apt/apt.conf.d/10periodic
And the variable we need to add is:
APT::Periodic::Update-Package-Lists "1";
There is a package in the Debian repository which will do this automatically. It's called apt-config-auto-update and it will configure APT for automatic cache updates. Its default settings in /etc/apt/apt.conf.d/10periodic are:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
These settings will check for updates and download upgradeable packages, if that's what you want. "1" means once a day apparently, so once a week would be "7". Autoclean can also be enabled.
To check up on automatic package list updates run:
# journalctl --since yesterday -u apt-daily.service
To check on Systemd's update schedule for APT (by default the time is randomised), run:
# systemctl edit apt-daily.timer
# systemctl status apt-daily.timerDebian Wiki.
If you would like to automatically install security updates, it is possible with unattended-upgrades, which creates a similar configuration file in the same location.
Now APT is doing a daily package list update, we just need a way of being notified of those available updates. But that will have to wait till the next post.
To be continued...
References:
Edited to correct command to check update schedule, 28-12-2022.
No comments:
Post a Comment