[plug] VNC Shell Script
Brock Woolf
ultima160 at iinet.net.au
Sun Nov 7 18:18:11 WST 2004
On 07/11/2004, at 5:57 PM, James Devenish wrote:
> Firstly: when you say that this doesn't work, there should be some log
> messages and e-mail that indicates (a) whether cron attempted to run
> your script and (b) what went wrong. There might be a mailbox sitting
> in /var/mail/brock or /var/spool/mail/root or whatnot.
I have checked these locations that you have specified, but the do not
exist on
my machine. I know what you are talking about by am uncertain as to
where
they would be located.
> Secondly: where is the rfbserver.sh script located? You have written in
> your crontab that the brock_scripts folder is at the topmost folder
> level of your filesystem. In contrast, most UNIX people would have
> their
> personal scripts in their "home directories", not at the top level of
> the hard drive. For instance: /home/brock/brock_scripts/rfbserver.sh
> or ~/brock_scripts/rfbserver.sh
The script was located in the top most directory as you said, so
I have moved it now to:
/home/brock/scripts/rfbserver.sh
I have re-configured the crontab for "brock" as:
*/2 * * * * brock /home/brock/scripts/rfbserver.sh
The contents of "rfbserver.sh":
#!/bin/sh
if ps -auxww | grep "x0rfbserver" | grep -v grep ; then
exit 0
else
DISPLAY-:0 x0rfbserver
fi
> Thirdly: in order for a shell script to be run as a programme, it must
> have "execution permissions" enabled. `ls -l /path/to/rfbserver.sh`
> will
> indicate to us whether this is the case (perhaps you will need to do
> `chmod +x /path/to/rfbserver.sh` to make this happen). The '.sh'
> filename extension has no semantic meaning or function in UNIX -- it
> is the execution permissions that matter.
When i right-click the "rfbserver.sh" file, in the permissions tab it
says:
ls executable
and the check-box is ticked.
>
After doing all of this I restarted crond by typing:
pkill crond && crond
- Brock
More information about the plug
mailing list