PDA

View Full Version : Linux Ubuntu/Debian - VNC Server Connection Refused



WarNox
25-05-2009, 11:52 PM
Hey!

Alright so I've been trying to get this to work for a decent few hours now and haven't got far.

I've got Debian 5.0.1 installed on a machine. I want to get VNC working on it the same way as it does in windows - to be able to connect to the machine when the computer is sitting on the logon screen.

What does work:
Setting up Remote Desktop in Debian and connecting to it that way, but this doesn't work on the logon screen.

What doesn't work:
I followed this guide: http://ubuntuforums.org/showthread.php?t=191564&highlight=vnc+gnome&page=1

All went ok and the computer is listening on port 5901 but I get a connection refused whenever I try to connect to the vnc server.

I can "telnet 192.168.1.250 5901" and "netstat -ab" shows 0.0.0.0:5901 but whenever I try and vnc in I get:



vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server

Anyone have any idea why Debian is refusing the connection?

Thank you,



Gregor

Erayd
26-05-2009, 01:02 AM
You're using VNC on a non-default port (it's usually port 5900 + display number) - display 0 is generally on port 5900 and is the default for most clients. The guide you followed involves a new X display (1), which is exposed on port 5901.

To connect to it, tell your VNC client to connect to port 5901, or use display 1 rather than display 0 - the reason you're getting nowhere at the moment is because your client is trying to connect to the wrong port.

WarNox
26-05-2009, 08:25 AM
Yeah the guide sets up port 5901. Which is open as I can telnet to it. But whenever I try and VNC to it I get a 'connection refused' error. I do try connecting to the right port using:

hostname:5901
hostname:1

but neither works.

Erayd
26-05-2009, 04:44 PM
Which client are you using?

WarNox
26-05-2009, 06:43 PM
Real VNC from a WinXP comp and whatever vncviewer comes installed with Debian/Ubuntu when I try and connect to localhost.