[plug] VNC Shell Script

Brad Campbell brad at wasp.net.au
Sun Nov 7 16:24:43 WST 2004


Brock Woolf wrote:
> Hi,
> I am stuck in the middle of writing a shell script.
> I want to setup a Cron job that will start a VNC server every 15 minutes 
> if it is not running.
> The VNC server i want to execute uses the command "rfbdrake"
> The problem is that if that command is run it brings up the GUI and has 
> a box for a password.
> I have not been able to find any command for this program and there is 
> no man file.
> 
> So if the script were to run, it would only open the program but not 
> actually start the program with the password.
> I am running Mandrake 10.0 Official.
> Does anybody know a solution to this problem.
> 
> Here is my setup:
> 
> Cron tab file, so far (without the dashes):
> **/15 * * * * brock /brock_scripts/rfbdrake.sh*
> 
> 
> And this is the "rfbdrake.sh" shell script it refers to:
> *#!/bin/sh
> if ps -auxww | grep "x0rfbserver" | grep -v grep ; then
> exit 0
> else
> rfbdrake*

As an alternative, try something like

if [ -z `pgrep x0rfbserver` ] ; then

The other thing I wasl going to mention is x0rfbserver appears to be unsupported these days.

I know x11vnc has an option to use a password file, thus not requiring you to enter one as it starts up.

Regards,
Brad.

PS. Plain text E-mail please



More information about the plug mailing list