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 have a Centos Desktop VM installed in Virtualbox, and want to connect to it using VNC. I have tried to install vnc-server, but could not connect. I removed it, then tried tigervnc-server, but same problem. I thought this was a firewall problem, but after disabling the firewall I still can't connect.

I followed this guide: http://www.unixmen.com/install-vnc/

The username is "john". I added an entry in /etc/sysconfig/vncservers:


When I connect from my Ubuntu desktop, I get the following error:

An error occurred - Connection to host was closed.

I have no idea what is missing here. How can I configure this properly?

share|improve this question
I recently setup VNC server in one of our labs and the machine was RHEL 5.6. I had documented it. Please let me know if this is useful. unix.stackexchange.com/questions/116189/… –  Ramesh May 1 '14 at 15:39
Thanks. I'll try this as soon as I'm in the office. –  SPRBRN May 1 '14 at 19:37

Your Answer


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

Browse other questions tagged or ask your own question.