Starting Linux VNCServer at bootup
Hartmut Steffin
h.steffin "at" abi-behoerden.de
Fri, 28 Jan 2000 09:28:17 +0000
Hi Todd,
> > while in rc scripts. modify your line to:
> >
> > su - user -c /usr/local/bin/vncserver :0 &
> >
> > (you can omit user, if you use root [what you shouldn't])su
> will set all
> > your environment before executing the command.
>
> Got the same message unfortunately.
hmmm, this is funny. the basic difference between running something from
startup or at a user's prompt is the environment. this should be set by
"su -". so if it runs from the prompt, it should(!) work in this modified
script now.
> > a still better approach is to have xdm (or even kdm) start
> your server. you
> > will then find your familiar desktop (gnome, kde, whatever)
> including the
> > login-mechanism. you find a file Xservers somewhere
> (/usr/X11R6/lib/xdm on
> > my SuSE). add one (or more) line(s) like
> >
> > :1 local /usr/local/vnc/Xvnc -geometry 1000x730 :1
> > :2 local /usr/local/vnc/Xvnc -geometry 1000x730 :2
> >
> > comment the
> > :0 local /usr/X11R6/bin/X : 0 vt07 (or similar)
> > line, if you don't want to start X on your Console as well.
> be sure to have
> > unique displaynumbers :0 :1 :2 etc...
> >
> > configure your system in a way that it starts X (e.g. by setting
> > DISPLAYMANAGER=kdm (for kde, else xwm or whatever) in
> /etc/rc.config (SuSE
> > again).
> >
> > Your desktop on your vnc desktop now looks exactly like that on your
> > console!
>
> Problem is is that I am running Slackware, so I don't get a
> graphical logon at
> startup. I did try running XDM at the prompt, and got a very
> basic graphical
> login prompt at the console, so I figured that I could add in
> the line to start
> VNCserver as suggested, REM out the :0 line to prevent X from
> starting on
> the console, and then starting XDM at startup. But before I
> tried to add XDM
> to my startup files, after doing the above modifications, I
> tried running XDM
> again at the prompt, but this time I got nothing, and it did
> not start VNC.
you got nothing? you mean no message? this is right, xdm and Xvnc don't talk
to stdout. the messages you get from running "vncserver" come from the
script, that you now don't use anymore. you can only see the processes with
e.g. "ps fax". You should see both xdm and it's child Xvnc.
Two things to keep in mind, while testing:
1st: When connecting with the viewer, be sure to use the right port, if you
don't use the preset ":1" !
2nd: be sure to have no concurrent processes xdm and Xvnc and used ports
just from trying out so many times!
e.g. when you start "vncserver" it first uses :1 by default. if your entry
in the Xserver file uses the same port, it then fails (unlike the script
vncserver, which dynamically chooses the next free port).
Hope this helps,
Hardy
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------