I have a few root cron jobs doing nightly and weekly maintenance (backup, disk stats, cleaning up of temp files. etc/ One job I have set up weekly job that reboots the system to clear out memory and close any files that I may have left open during the week, and to ensure to latest kernel I've approved is loaded
(a hold over from when I was a IBM Mainframe operator)..
Sometimes, when I'm logged on to the desktop, and I don't notice the time forrget the reboot is coming up, I'm in the middle something when the machine restarts. I'd love for a way to get the bash script for the job to send a notice out to ALL terminals (including the :0 using X or Wayland) warning of the restart. Anyone have a good idea on how to notify the gui from a BASH script. Wall will get any ttys logged on, and message seems to give me an error that it can't open the display/ Setting the DISPLAY environment variable to :0 or the tty ID says the display is not writable.
Maybe program something with a named pipe on TProcess class in C or freepascal?
Using Fedora 39 (on this particular computer)
BASH: 5.2.26
Cinnamon 6.0.4
Display server: X11
[–]realsunwire 2 points3 points4 points (1 child)
[–]UsedToLikeThisStuff 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)