View Single Post

   
  #8 (permalink)  
Old 02-15-2008, 05:20 PM
Roger Cornelius
 
Posts: n/a
Default Re: VNC giving a gray screen on OSR5.0.6

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 : '\([^:]*\)`"

Reply With Quote