I have a process that runs as root, from cron.daily
, and may need to send results to a logged-in user.
Is there anything like an X version of wall
or write
? I am trying to avoid mail
because it may be too involved for the user.
Details
I am setting up a Linux Mint Cinnamon laptop for a non-technical user, coming from a Windows 7 background. Anti-virus has been specifically requested.
This script is in cron.daily
#!/bin/bash
# ClamAV antivirus maintenance.
LOGFILE=/var/log/av-results.txt
Update the signature database. Populates the file /var/lib/clamav/daily.cvd
systemctl stop clamav-freshclam
freshclam
systemctl start clamav-freshclam
Run a scan
clamscan --infected --recursive --log=$LOGFILE /home
if [[ $? -eq 1 ]]
then
wall "Virus(es) found. Call support"
fi
chmod 666 $LOGFILE
but the wall
does not work, because the user is using Cinnamon not terminal
.
ClamTK
(the GUI version of ClamAV
) has been ruled-out because I cannot get it to work.
/etc/clamav/detected.sh
(though following entirely this documentation gets on-demand settings to make it behave as on Windows: realtime detection (and probably slowdown)). – A.B Aug 30 '20 at 10:52