Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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 Jun 2 '11 at 18:47

3 Answers 3

up vote 2 down vote accepted

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.

share|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

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

share|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

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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