0

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.

  • There's an example on how to implement this at Archlinux' wiki: wiki.archlinux.org/index.php/ClamAV#OnAccessScan . Don't follow it literally, the part that interests you is only the contents of /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
  • 2
    @A.B And the author of that script apparently also posted (a variation of?) it on this site: https://unix.stackexchange.com/a/307097/315749 :-) – fra-san Aug 30 '20 at 11:06
  • These are a great help - but why aren't they answers? – Peter bill Aug 30 '20 at 12:55
  • @Peterbill To me, because, when two questions have the same set of answers, they are duplicates (and there is no point in duplicating the answers too). But I've never used Cinnamon and I can't know if the solutions proposed in the linked Q/A worked for you. – fra-san Aug 30 '20 at 13:13

0 Answers0