5

I've just installed TigerVNC on my Fedora 15 machine from the package manager then in terminal (as root):

chkconfig vncserver on service
vncserver start

None gave me errors, so I went back to the Windows 7 machine and fired up the viewer. But after a few seconds i get

unable to connect to socket: connection timed out(10060)

Does anyone know what to open up or fix on the Fedora machine to make this happen?

  • There's probably something (a firewall) blocking the port used by VNC. It could be on the Windows machine, on the Fedora machine or some place in between. On the Fedora machine, check the output of iptables -nvL. On Windows, we can't help you. – Gilles 'SO- stop being evil' Jun 2 '11 at 18:47
4

Check for firewall on your fedora system by (as su):

iptables -nvL

If the firewall is blocking you should add a rule to accept packets on port 5900.

Check if the port is open on your fedora machine (as su):

netstat -tpln | grep "5900"

If you don't get any output, it means the daemon isn't running or their is some configuration problem.

Also you should use vncpasswd to set a vnc password on your fedora machine.

| improve this answer | |
  • Im pretty n00b, can't you write what i need to write in the terminal to open this port (it does not matter if its already open i would guess)? the iptables command did not give me much info on what the problem could be – Jason94 Jun 2 '11 at 20:38
  • @Jason94: Try iptables -A INPUT -p tcp –dport 5900 -j ACCEPT in terminal. However changes will be lost unless you make it execute at startup. Hope that helps. – Deepak Mittal Jun 3 '11 at 7:50
  • netstat -tpln led me to the answer to my problem. Followed a tut that said to use :1 when starting the server which results in the server listening on port 9001. My viewer was trying to connect to 9000. Changed it to :0 and it now works. – Bill Stidham Jul 29 '15 at 0:18
5

VNC servers on linux generally run on port 5900+$DISPLAY, wich is in most cases 1, so default vnc port on linux will be 5901 instead of 5900 on windows machines. Firing up the VNC server a 2nd time will launch it on 5902 (since the first display is already in use).

When connecting with a vnc client u will have to specify this port in your viewer: f.e.:

192.168.0.101:5901
| improve this answer | |
0

Could be that the server listening on port 5901. TigerVNC on Centos 6.0 listens on 5901.

| improve this answer | |
  • Could you give a command to check that the server listen on port 5901 on Fedora 15 as it does on Centos 6.0? – Philippe Blayo Nov 17 '12 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.