vncserver unable to connect to host: Connection refused (111) 7.10

Ted Hilts thilts at
Wed May 7 23:45:20 UTC 2008

primorec wrote:
> Hi All,
> short description:
> I am not able to connect to vncserver running on ubuntu 7.10.
> I've tried to connect locally and remotely to no avail
> starting server:
> [igor at thinkpad-T40 ~]$ vncserver
> New 'X' desktop is thinkpad-T40:1
> Starting applications specified in /etc/X11/Xsession
> Log file is /home/igor/.vnc/thinkpad-T40:1.log
> starting viewer on the same machine:
> --------------------------------------------------
> [igor at thinkpad-T40 ~]$ vncviewer
> VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 17:17:04
> Copyright (C) 2002-2005 RealVNC Ltd.
> See for information on VNC.
> Tue May  6 14:30:30 2008
>  main:        unable to connect to host: Connection refused (111)
> starting viewer on the remote machine:
> ------------------------------------------------------
> 502 palace:~ > vncviewer
> vncviewer: ConnectToTcpAddr: connect: Connection refused
> Unable to connect to VNC server
>  I can start viewer on the offending machine and work with any remote host.
> So, the vncviewer on the offending machine  ( is working.
> So, the  problem is:
> vncviewer can NOT conenct to the vnc server on the same machine (aka
> offending machine)
> vncviewer on any other host can not connect to the vncserver on the
> offending machine
> but it connects to any other server on any other host.
> Any hint, advice, RTFM pointer, solution is more than welcome
> Please help
> Igor
I had a similar problem. If you are on the client machine (the machine 
using the viewer) then you want to view the desktop of another machine 
called the server. This means that the server machine has to be set up 
properly. I think the error message you are getting is from the server 
and therefore you cannot view it's desktop. On one of my XP machines 
(the server) worked right off the bat. But on another XP machine I first 
have to shutdown the server (see the server icon and it's properties) 
and then I have to reactivate the server. When I do this a Dos window 
opens which I minimize and the server icon reappears and the client can 
then view the servers desktop. In other words, the sever is not 
responsive even though it should be. Note also that you should initially 
go to either the server or client properties (it is obvious which one 
when you look at the properties of both) and make sure that the 
authorize category does not require a password. That way your first 
efforts are kept simple. Note that there are 2 icons for each machine -- 
client icon and server icon -- unless you only downloaded one of them. 
Make sure you download the package containing both and that you download 
for the kind of machine -- in my case XP and Ubuntu. If none of this 
works (and I think it will) then in the services section of XP for 
example and on Ubuntu make sure remote desktop is enabled and any other 
service that might possibly be associated with the desktop. Do this only 
if you have to get that detailed. I had checked for these services and 
still had the problem until I shut down the XP machine and restarted the 
server. If you do not have a server icon you can make one on XP by going 
into Windows-Program Files-etc. and find the two executables -- viewer 
and server and activate the appropriate one or drag and drop onto the 
desktop to create an icon.

Thanks -- Ted
Let me know if you get it working. Make sure you have the Ubuntu viewer 
and server.

More information about the ubuntu-users mailing list