|
|
Question : Mandrake 9 - VNC Autostart as a service - how to?
|
|
Hi there
I'm trying to get VNC server to autostart as a service, I've already installed the RPM, but I am very new to Linux. I'm just wondering if there is a way to get VNCServer to autostart whenever the PC is booted up and to automatically set the same password every time.
Cheers
|
Answer : Mandrake 9 - VNC Autostart as a service - how to?
|
|
Chanses are great the the installation of the server package already did some of that is necessary for you. Check with: ls /etc/rc*d/*vnc* that it has created some "startup" scripts for you (they will probably all be on the form ".../K35vncserver", which actually tells init to shut down the service for those runlevels). "chkconfig --list vncserver" will show the same info in a rather more intelligible way:-).
Now, decide which runlevels you want the vncserver to run at (I run it at runlevels 3, 4 and 5, which are the defaults), then run: chkconfig --level vncserver on or (trusting the defaults to be more or less correct:-) use the more convenient: chkconfig vncserver on
Edit /etc/sysconfig/vncservers, and add an entry for the server(s) you want /etc/init.d/vncserver to start. Do this by uncommenting the line: # VNCSERVER="1:myusername" so that it reads VNCSERVER="1:myusername" and where you have changed "myusername" to a regular user that exists on your system (perhaps the regular user you created during install?).
Remember to set the vncpassword for the user that the vncserver will run as. It's as simple as running vncpassword logged on as that user.
Then start the server with /etc/init.d/vncserver start If you had started a vncserver with the /usr/X11R6/bin/vncserver command already, it might be a good idea to stop that before running the initscript. You do that with something like "vncserver -kill :1".
HtH -- Glenn
|
|
|
|
|