VNC Connects Then Hangs

Posted by Benjamin Close on August 6, 2009 under Computers, OpenSource, UniSA | 4 Comments to Read

The other day I was working with a few colleges using VNC. We came across an issue with our VNC setup. We could connect a VNC client (be it tightvnc, vncviewer, vinagre or x4vnclient) to our vnc server but never see anything on the screen. It was if the server was freezing or hanging.  This left us wondering why. Initially we thought we had broken something in the VNC server – after all we had made code modifications. However the solution turned out to be a very simple fix.

You see the VNC protocol has the ability to place a client ONHOLD. During this state the clients events are not transmitted and the server sends back no images. This is what was happening to us. Normally the VNCServer will place the client on hold during a connection, asking the user to accept/reject the client. However we had been playing around with configuration files and set the prompt to disabled – we wanted automatic connection, with no prompt. Hence the VNCServer was placing the client on hold, noticed prompts were disabled and because authentication had not been established, sat there twiddling it’s thumbs.

A simple configuration file fix and everything was working again. Ironically at the same time we also discovered that modifying files by had in ~/.gconf/* doesn’t do anything as there’s a daemon that holds the configuration and it periodically writes to ~/.gconf/* overwriting any changes you might have made – hence we used gconftool2.

The Fix?

To allow gnome to prompt the user for authentication. Hence a dialog would show up and the authorisation could take place.

gconftool-2 -s -t bool /desktop/gnome/remote_access/prompt_enabled true

You can also find this same setting in gconf-editor if you want a gui way to update it.



Donations keep this site alive

  • 2012 said,

    Ben,
    I see your the same person that posted the hws info. is this your blog?

  • Benjamin Close said,

    Yes, this is my blog

  • krongle said,

    why post a blog about a simple fix, and not mention what the simple fix was?

  • Benjamin Close said,

    A very good point, fix now listed

Add A Comment

*