Click to See Complete Forum and Search --> : VNC server


kevin79
12-28-2001, 05:53 PM
I set up the VNC server so that I can access the X window remotely, but I can't get it to run automatically at startup.

I want it to be able to handle 3 sessions when it boots. I have followed the info on this link: http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=1&t=011051

But I still can't get it to work.

Thanks.

error27
12-30-2001, 04:06 AM
it's good that you did the search.

what distro are you using?

i haven't tried it myself, but i can almost garuantee if you installed it in debian it would start up automatically like you want.

did you install from rpm or tar.gz? if from tar.gz I say you should use the rpm instead.

kevin79
12-30-2001, 05:44 PM
Originally posted by error27:
<STRONG>it's good that you did the search.

what distro are you using?

i haven't tried it myself, but i can almost garuantee if you installed it in debian it would start up automatically like you want.

did you install from rpm or tar.gz? if from tar.gz I say you should use the rpm instead.</STRONG>


I am running redhat 7.2 and it was installed when I installed RedHat. Anyone have any other suggestions?

Keyser Soze
01-01-2002, 02:35 AM
Just have it start by putting a link in a runlevel. You can use tksysv if you need the gui. It does work, have 10 instances run on my startup. ;)

error27
01-01-2002, 05:39 AM
add a line

echo "The new startup script ran"

to the start of the file then if you don't see that line after you reboot then the script didn't run.

otherwise the problem is with the script you wrote.

kevin79
01-02-2002, 10:20 AM
Here is my startup script. It is in /etc/rc.d/init.d and its called vnc

#!/bin/sh
# chkconfig: 2345 99 00

case "$1" in
'start')
vncserver :1
vncserver :2
vncserver :3
touch /var/lock/subsys/VNC
;;
'stop')
vncserver -kill :1
vncserver -kill :2
vncserver -kill :3
rm -f /var/lock/subsys/VNC
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0

then I did
ln -s /etc/rc.d/init.d/vnc /etc/rc.d/rc5.d/S19vnc

It says it starts fine, but if I tried to connect, it doesn't work.

mychl
01-02-2002, 12:35 PM
Try adding the link to rc3.d and rc4.d aswell. I had a similar problem getting smb to start and putting the link in multiple runlevels worked.

kevin79
01-02-2002, 01:38 PM
I tried that, but it still doesn't work. When I try to connect, I get "failed to connect to server".

Here is my boot log:

Jan 2 12:31:51 SP-IS097 vnc: xauth: creating new authority file //.Xauthority
Jan 2 12:31:51 SP-IS097 vnc: xauth: (argv):1: bad display name "SP-IS097:1" in "add" command
Jan 2 12:31:51 SP-IS097 vnc: xauth: creating new authority file //.Xauthority
Jan 2 12:31:54 SP-IS097 vnc:
Jan 2 12:31:54 SP-IS097 vnc: New 'X' desktop is SP-IS097:1
Jan 2 12:31:54 SP-IS097 vnc:
Jan 2 12:31:54 SP-IS097 vnc: Creating default startup script //.vnc/xstartup
Jan 2 12:31:54 SP-IS097 vnc: Starting applications specified in //.vnc/xstartup
Jan 2 12:31:54 SP-IS097 vnc: Log file is //.vnc/SP-IS097:1.log
Jan 2 12:31:54 SP-IS097 vnc:
Jan 2 12:31:55 SP-IS097 vnc: xauth: (argv):1:
Jan 2 12:31:55 SP-IS097 vnc: bad display name "SP-IS097:2" in "add" command
Jan 2 12:31:58 SP-IS097 vnc:
Jan 2 12:31:58 SP-IS097 vnc: New 'X' desktop is SP-IS097:2
Jan 2 12:31:58 SP-IS097 vnc:
Jan 2 12:31:58 SP-IS097 vnc: Starting applications specified in //.vnc/xstartup
Jan 2 12:31:58 SP-IS097 vnc: Log file is //.vnc/SP-IS097:2.log
Jan 2 12:31:58 SP-IS097 vnc:
Jan 2 12:31:58 SP-IS097 vnc: xauth: (argv):1:
Jan 2 12:31:58 SP-IS097 vnc: bad display name "SP-IS097:3" in "add" command
Jan 2 12:32:01 SP-IS097 vnc:
Jan 2 12:32:01 SP-IS097 vnc: New 'X' desktop is SP-IS097:3
Jan 2 12:32:01 SP-IS097 vnc:
Jan 2 12:32:01 SP-IS097 vnc: Starting applications specified in //.vnc/xstartup
Jan 2 12:32:01 SP-IS097 vnc: Log file is //.vnc/SP-IS097:3.log
Jan 2 12:32:01 SP-IS097 vnc:
Jan 2 12:32:01 SP-IS097 rc: Starting vnc: succeeded


But if I type vncserver, i get this:

[root@SP-IS097 log]# vncserver
xauth: (argv):1: bad display name "SP-IS097:1" in "add" command

New 'X' desktop is SP-IS097:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/SP-IS097:1.log