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. Jun 2, 2011 at 18:47

3 Answers 3


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.:

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.

  • 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, 2011 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. Jun 3, 2011 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. Jul 29, 2015 at 0:18

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

  • Could you give a command to check that the server listen on port 5901 on Fedora 15 as it does on Centos 6.0? Nov 17, 2012 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .