I have a Debian 8 VPS which I installed MATE desktop environment using the tasksel command.

I then installed a VNC server using

apt-get install vnc4server

but when I use realvnc to connect I get the following message

The connection was refused by the host computer

Any pointers as what I need to do in order to connect using vnc?

  • Hi, opening a VNC port for the Internet-at-large is a terrible security practice. That said, go to the web interface of the VPS provider and open 5900/TCP in their firewall interface at your own risk. I´d suggest to add to this and future posts the name of that VPS provider, there are often specific issues tied to them. Jul 1, 2016 at 7:02

1 Answer 1


You have to actually run the vncserver - it does not start automatically.

And if by any chance you want to share your existing session, vncserver is not the right tool - you want x11vnc or vino for that.

  • @Arya: and if you nevertheless use vnc4server, chose a non existent display to avoid errors. Aug 12, 2016 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .