using xbiff on remote mail
Lester Ingber
ingber@ingber.com
Wed Dec 17 06:42:00 GMT 2003
I've been trying to use xbiff to monitor a remote mailbox as in `man xbiff`:
checkCommand (class CheckCommand)
Specifies a shell command to be executed to check for new mail
rather than examining the size of file. The specified string
value is used as the argument to a system(3) call and may
therefore contain i/o redirection. An exit status of 0 indi-
cates that new mail is waiting, 1 indicates that there has been
no change in size, and 2 indicates that the mail has been
cleared. By default, no shell command is provided.
I set up a command line for xbiff in a command file:
----------8<---------- top cut 1/2 -> bottom 1/2 ----------->8----------
#!/bin/tcsh
run xbiff -xrm 'checkCommand "/home/ingber/local/bin/mbsize"' -update 15 -fg red -geometry 75x75+0+75
----------8<---------- bottom cut 1/2 <- top 1/2 ----------->8----------
I've tried some different variations of single and double-quotes in
this command.
I've tested the `mbsize` command file and it does what is expected by
checkCommand().
----------8<---------- top cut 2/2 -> bottom 2/2 ----------->8----------
#!/bin/tcsh -f
set HEADER = 13
set MB = `ssh -q -x XXX.com -n /home/ingber/local/bin//mbsize`
if ( $MB <= $HEADER) then
/bin/rm -f /home/ingber/.Lester_mailbox
echo 2
else
if (-e /home/ingber/.Lester_mailbox) then
set MBHOME = `cat /home/ingber/.Lester_mailbox`
if ($MB > $MBHOME) then
/bin/rm -f /home/ingber/.Lester_mailbox
echo $MB > /home/ingber/.Lester_mailbox
echo 0
else
echo 1
endif
else
echo $MB > /home/ingber/.Lester_mailbox
echo 0
endif
endif
----------8<---------- bottom cut 2/2 <- top 2/2 ----------->8----------
When I run xbiff, the mailbox window pops up OK, but it not running
checkCommand() as far as I can tell?
Thanks.
Lester
More information about the Cygwin-xfree
mailing list