Re: Debian 13 Trixie GUI desktop environments
On Monday, September 1st, 2025 at 5:09 AM, Lee <ler762@gmail.com> wrote:
> On Sat, Aug 30, 2025 at 3:15 PM Andy Smith wrote:
>
> > Hi,
> >
> > On Sat, Aug 30, 2025 at 04:24:59PM +0000, Turritopsis Dohrnii Teo En Ming wrote:
> >
> > > You mean Debian doesn't inform you if your OS needs an update?
> >
> > It is dependent on the desktop chosen. GNOME by default downloads
> > updates, and notifies you of them with a desktop notification.
> >
> > The package "apticron" for email notifications has also existed in
> > Debian for a decade or more though people still seem to enjoy
> > reinventing it on their own.
>
>
> Or perhaps it's that an email notification is useless for us and we
> want a notification that will actually be noticed.
>
> I've got two separate scripts:
> 1. to put the list of packages that can be upgraded into /etc/motd so
> that when I ssh there I get a notification that updates are available
>
> # crontab -l
> # Edit this file to introduce tasks to be run by cron.
> #
> ...
> 47 4 * * * (apt update >> apt-update.log 2>/dev/null)
>
> && (apt list --upgradable 2>/dev/null | egrep -v '^Listing' >|
>
> /etc/motd)
>
>
> 2. a script that gets run when I login locally to pop up a desktop
> notification that updates are available.
>
> $ cat /usr/local/bin/check-for-updates.sh
> #!/bin/bash
> # see if there are any Debian updates and pop up a notice if there are
>
> # to allow 'sudo' without entering a password you need an
> # /etc/sudoers.d/adm-apt-privs
> # that has
> # Cmnd_Alias ADM_COMMANDS = /usr/bin/apt update
> # %adm ALL = (root) NOPASSWD: ADM_COMMANDS
> #
> # And an "Application Autostart" entry to run this script at login time
> # Start / Settings / Session and Startup
> # select "Application Autostart" tab
> # click the Add button
> # Name: Check for updates
> # Description: Check for Debian updates
> # Command: /usr/local/bin/check-for-updates.sh
> # Trigger: on login
>
> # get a temporary file
> tempf=$(mktemp -q --tmpdir=/tmp -t updXXXXX)
> stat=$?
> if [ ${stat} != 0 ]; then
> notify-send -u critical "OhNoes!!! check-for-updates: Unable to
> create a temporary file. Status: ${stat}"
> exit 9
> fi
>
> # wifi can take a while, so wait for an active network connection
> /usr/bin/nm-online -q --timeout 120
> stat=$?
> if [ ${stat} != 0 ]; then
> notify-send -u critical "OhNoes!!! check-for-updates: nm-online
> returned ${stat}"
> fi
>
> # check for updates
> sudo apt update 1>/dev/null 2>&1 && \
>
> apt list --upgradable 2>/dev/null | grep -v '^Listing' > ${tempf}
>
>
> [ -s "${tempf}" ] && \
> notify-send -u critical "Debian updates available" "$(cat ${tempf})"
>
>
> Regards
> Lee
Script looks complicated.
Regards,
Mr. Turritopsis Dohrnii Teo En Ming
Targeted Individuals Singapore
Reply to: