Thanks to all who send me e-mail off line. Doing the "su - username ..."
shown below worked very will. The only problem I had after installing this
method was that Xvnc was not starting. It ended up that this was because
instead of using the standard xstartup that starts the "twm" window manager,
mine points to Xsession. At the time of launch the standard X manager was
not fully running yet  os the server could not reference it.

I put a 3 second delay in vncserver right before Xvnc is invoked. This did
the trick.

Dave Scruggs
Senior Software Engineer 
EDO Reconnaissance and Surveillance Systems, Morgan Hill Ca.
(formerly Condor Systems)

Captain, Boulder Creek Fire Dept.
Boulder Creek, Ca


> -----Original Message-----
> From: Mike Miller [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 2003 12:45 PM
> To: Scruggs, David
> Subject: Re: Running Xvnc as daemon at Solaris Boot
> 
> 
> On Tue, 11 Mar 2003, Scruggs, David wrote:
> 
> > I am running Solaris 8 and connecting to it from a Win 2000  machine. It
> > works exactly as we need, as long as someone has previously  logged in
> > and started vncserver as a user, not as root.
> >
> > What I want to be able to do is start Xvnc (or vncserver)  as a daemon
at
> > system boot, and log in as the user. Right now, when I log  in, it
brings
> > up the Root desktop, not the user desktop. The exact same  script brings
> > up the user desktop when started as the user.
> >
> > I put the start up script in /etc/rc3.d/ and made the user  the owner of
> > the script, plus set the "user-id" bit on the script  permissions as
well
> > as on the Xvnc application.  Xvnc is running as the user.
> 
> 
> This is already in the archives, so not sent to the list...
> 
> Best,
> Mike
> 
> 
> Date: Mon, 19 Aug 2002 12:21:35 -0500 (CDT)
> From: Mike Miller <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RE: Solaris 8.0 Automatic Startup
> 
> > > -----Original Message-----
> > >
> > > I'm a newbie to unix and I'm trying to get VNC to  automatically start
> > > when the Sun system boots.  I have read many threads  throughout the
> > > archives but I still don't understand the correct  procedure.  I can
> > > launch VNC from a shell prompt and it works every time.   I'd like it
> > > to be used by anyone except root.  Can someone explain how an
> > > automatic startup process for VNC should occur.  Also, does anyone
> > > have any configuration files as examples? Thanks for any help...
> 
> 
> My approach is to use the usual startup/stop script approach used by
> other Solaris programs.
> 
> First become root.  Then create a file called 
> /etc/init.d/rc.vnc with the
> following content (modified appropriately, see below):
> 
> ---------------start file on next line--------------------
> #!/bin/sh
> #
> # Startup/Stop script for vncservers for some users.
> #
> 
> case "$1" in
> 
> 'start')
>    /bin/su - bob -c "/usr/local/bin/vncserver :1"
>    /bin/su - sally -c "/usr/local/bin/vncserver :2"
>    /bin/su - jim -c "/usr/local/bin/vncserver :3"
>    ;;
> 
> 'stop')
>    /bin/su - bob -c "/usr/local/bin/vncserver -kill :1"
>    /bin/su - sally -c "/usr/local/bin/vncserver -kill :2"
>    /bin/su - jim -c "/usr/local/bin/vncserver -kill :3"
>    ;;
> 
> *)
>    echo "Usage: /etc/init.d/rc.vnc { start | stop }"
>    ;;
> 
> esac
> ---------------end file on previous line--------------------
> 
> The names bob, sally and jim are usernames.  Modify accordingly.  The
> corresponding numbers :1, :2, :3 for VNC may also need to be changed.
> 
> Make sure that /etc/init.d/rc.vnc has the correct 
> ownership/permissions:
> 
> chown root:other /etc/init.d/rc.vnc
> chmod 744 /etc/init.d/rc.vnc
> 
> 
> Next create symbolic links to that file as follows:
> 
> cd /etc/rc0.d
> ln -s ../init.d/rc.vnc K40rc.vnc
> cd /etc/rc2.d
> ln -s ../init.d/rc.vnc S99rc.vnc
> 
> That should do it.  I've been doing it this way for years and it works
> great for me.  I'd rather not add things to inetd.conf when I 
> don't have
> to.
> 
> Mike
> 
> -- 
> Michael B. Miller, Ph.D.
> Assistant Professor
> Division of Epidemiology
> University of Minnesota
> http://taxa.epi.umn.edu/~mbmiller/
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to