starting vncserver from rc.local
I'm a little new to Slackware so maybe this isn't the right way to initiate vncserver on boot, but here's what I've got. The last two lines in my rc.local are:
/usr/bin/vncserver :1 & mount.cifs //192.168.1.99/shared /mnt/shared -o username='uname',password='passwd' the second line runs successfully on boot, but the first line doesn't. However, after I am logged on, I can execute /etc/rc.d/rc.local and both lines will run successfully. Does the system need to be fully logged on to start the vncserver, or should I start it elsewhere other than rc.local ? Thanks in advance. Mike ----------------------------- Using Slackware 13.1 (32 bit) and the Vnc package that came with the Slackware image, not sure of the version. |
You should be starting /etc/rc.vncservers from rc.local. There is also a /etc/rd.d/rc.vncservers.conf that may require editing.
Code:
if [ -x /etc/rc.d/rc.vncservers ]; then |
I used to use the following as a start-up script for VNC. It was called from /etc/rc.d/rc.local (and therefore run by root):
Code:
#!/bin/sh |
Thanks fellas. Was that code your rc.venserver gilead ? I don't think I have a rc.vncserver so I probably need to make one.
|
Yep, that's right - it was in /etc/rc.d/rc.vncserver (call it whatever you like though)
|
got it fixed ! Thanks again fellas, I appreciate it. I think I'm gonna like being a slacker !
|
one more thing.....
When I want to end the session from the vnc-viewer machine, I click the vnc icon at the very top-left of the vnc-viewer window, the one at the left end of the title bar, and click the Close option from the menu that pops up. Then I can start a new session again later if I want. If I try to log off using the logoff menu-item on the remote screen like a local user would do, the viewer window goes black but doesn't close and the session is left open. Then you have to manually close the window anyway, and after you close it, you can't start a new session until a "rc.vncservers restart" has been done or a new server session started. I only post this in case anyone else might be wondering how to end a viewer session.
|
That's good to know - thanks for posting it. If you find VNC slow over the network, there's also rdesktop (Linux and Windows) or NX type solutions (nomachine, freenx for Linux environments).
|
Quote:
|
All times are GMT -5. The time now is 12:05 AM. |