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


AgentSmith
02-03-2004, 12:56 PM
Hello again,

Once again I find myself stumped. I'm wondering why I can't get VNC to work on my RedHat Linux 9 box. I've already installed the service and its running. But whenever I try to connect to it on one of my windows machines using VNC viewer (using the RedHat's IP address) it says that it can't find the server. If anyone could shed so light I would really be thankful!

Icarus
02-03-2004, 01:04 PM
You need to specify the display to attach to. The default is :0 and is not attachable by VNC. So try

vncviewer hostname:1


also if you do a "ps -ef | grep vnc" will also let you know what display it is running on the system

AgentSmith
02-03-2004, 06:15 PM
Thanks for getting to my question so quickly, unfortuneltly I have another. I put in "ps -ef | grep vnc" in and got
"admin 3487 3460 0 15:37 pts/1 00:00:00 grep vnc"
After getting this information I got on my windows box and opened vnc viewer I put in the ip address of the Red Hat computer with :0 and got back "Failed to connect to server". I then tried the ip address and :1 and I still got "Failed to connect to server." What am I doing wrong?

Icarus
02-03-2004, 06:33 PM
I put in "ps -ef | grep vnc" in and got
"admin 3487 3460 0 15:37 pts/1 00:00:00 grep vnc"

That's you looking for vnc...VNC is not running, that is the problem :)

AgentSmith
02-03-2004, 10:46 PM
I really appreciate your patience, obviously this is my first experience with Linux. My new question is why would vnc not be running? I have it "running" in service configuration, so why would it not be running? Is there somewhere else that I should start it from. Thanks for your help.

spowel4
02-03-2004, 11:23 PM
If you want to run vnc on your redhat box as root, edit the file /etc/sysconfig/vncservers to read
VNCSERVERS="1:root"

That will start the vncserver on display 1, running as root. If you want to run vnc as a user other than root, modify that line accordingly.

Icarus
02-04-2004, 10:03 AM
Originally posted by spowel4
If you want to run vnc on your redhat box as root, edit the file /etc/sysconfig/vncservers to read
VNCSERVERS="1:root"

That will start the vncserver on display 1, running as root. If you want to run vnc as a user other than root, modify that line accordingly. But never ever run VNC as root...talk about security problems, that's leaving up a big neon sign saying "Free Beer" ;)