Re: VNC giving a gray screen on OSR5.0.6 Roger Cornelius wrote:
> Greg Hines wrote:
> > >
> > > The first line of the script should be:
> > > #!/bin/ksh
> > >
> > > If not,then that's the problem, or at least it's one problem.
> > >
> >
> > Changing it still produces the same error. Was:-
> >
> > #!/bin/bash
>
> I don't do bash, but it apparently does parameter substitution
> similarly to ksh. Looking at /etc/rc2, I see it executes the scripts
> in /etc/rc2.d by doing "/bin/sh <script>", so that first line
> specifying the shell is ignored. The parameter substitution your
> script is using is not supported in sh, so you'll have to change it.
> E.g., you could do something like the following instead (not tested):
>
> su `expr $display : '.*:\(.*\)'` \
> -c "/usr/local/bin/vncserver :`expr $display : '\([^:]*\)`"
I left out a closing "'". That should be:
su `expr $display : '.*:\(.*\)'` \
-c "/usr/local/bin/vncserver :`expr $display : '\([^:]*\)'`" |