Hi
I have made a small antivirus script that i plan use as a cron.weekly job. What the script does is to pop up a dialog that will warn me that a scan is about to take place, and that it will affect my pc for a while.
Code:
#!/bin/sh
#Show a dialog box
/usr/bin/kdialog --title "Antivirus scan at: `/bin/date`" --msgbox "Antivirus scan will start in 10 seconds. It will affect the pc for the next 20 minuts or so."&
#Sleep for 10 seconds
/bin/sleep 10
#Update signatures
/usr/local/f-prot/tools/check-updates.pl
#Perform scan and send output to Klas mail
/bin/nice --adjustment=+19 /usr/local/bin/f-prot /home/klas/ /etc/ /bin/ /boot/ /lib/ /sbin/ /tmp/ /usr/ /var/ | mail -s "Virus scanning report" mail adress
The script workes fine when i manually run it as regulary user or as root.
The scanning part of the script also works fine when "cron" runs it, BUT the dialog wont pop up.
Why wont the dialog pop up? I am guessing that the "cron" shell dont have the same "settings" as my normal shells? How can i fix that?
Kind regards
Klas