Re: Message from root script to users?



On 5/18/07, Dave M <DaveM@xxxxxxxx> wrote:

I have a daily backup script that is by cron each night. If there is a
failure during the backup process I would like to have the script to
notify
the user and, if possible, allow the user to choose to cancel or re-try.
Is
there a way to launch a message box or a dialog box (using zenity?) on a
user from the script that is running as root?


Hi Dave,
One way would be to change the script and add another one to be run when
the user logs in. Change the backup script so that, upon failure, it sets a
flag or even a whole error message in a file that the user can read. Then,
in the user's .bash_profile, run another script that checks for the presence
of the file and generates the Zenity error message.

I've never used Zenity, so I don't know about any of its specific
functionality.

-- Vince --
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: ERROR: No space left on device /dev/stdout
    ... awk: close failed on file /dev/stdout ... If failure had no penalty success would not be a prize (T. ... my conclusion is that the stdout is indeed a plain file. ... Can you please give an example of a script designed to clean up output ...
    (comp.os.linux.development.system)
  • Re: ActiveX Task - Status = Failure or Success
    ... you must prevent the failure in the first place. ... > then on completion runs a second ActiveX Script to set the first Script ... > but then finds it on the second loop (i.e. reports success), ...
    (microsoft.public.sqlserver.dts)
  • Re: Help with a stragegy for diagnosis
    ... The failure of the openwas detected by the code itself ... script that reads the file. ... arose, the files were not apparently created. ... on normal or test transactions. ...
    (comp.lang.perl.moderated)
  • Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.
    ... Say someone wanted to call my script but wanted to mask it to always return ... sysrc foo; reboot ... echo "FAILURE: $FAILURE" ...
    (freebsd-hackers)
  • Re: xen, raid and initramfs failure
    ... Failure: failed to load Module 1 no such module ... the above section and just putting in a bunch of modprobes and it ... Can you edit the script, add set -x at the top and post the output? ...
    (Debian-User)