[plug] VNC Shell Script

James Devenish devenish at guild.uwa.edu.au
Sun Nov 7 17:26:07 WST 2004


Hi,

Glad to hear you are having success. 

In message <674F9C44-309D-11D9-8F16-000D936A747A at iinet.net.au>
on Sun, Nov 07, 2004 at 05:14:18PM +0800, Brock Woolf wrote:
> /brock_scripts/rfbserver.sh: line 8: syntax error: unexpected end of 
> file

This is the 'fi' problem that I mentioned. Add a line at the end that
contains only the word 'fi'. Here are two solutions:

1:
    #!/bin/sh
    if ps -auxww | grep "x0rfbserver" | grep -v grep ; then
        exit 0
    else
        DISPLAY=:0 x0rfbserver
    fi

2:
    #!/bin/sh
    pgrep x0rfbserver >/dev/null || DISPLAY=:0 x0rfbserver





More information about the plug mailing list