VNC server/client setup on Debian 9 Stretch Linux -

Next, we are going to set a VNC password for a user which will eventually create a VNC connection from a remote client. Login as you user using su and set a new password. In the example below we will set a new vnc password for linuxconfig user:
This is a companion discussion topic for the original entry at

Vaibhav Kurde

AFAIK, vnc just replicates the screen of server pc on . And RDP allows us to log in to remote server with username-password with new session on remote PC

I have installed vnc4server on Raspbian Debian which is on VirtualBox and currently logged in. I have connected to that VNC server from Host W10 RealVNC Chrome app viewer.
When I connects to remote server via VNC, I see a screen which is different than the current screen of VirtualBox screen. It is not ‘mirroring’ the server screen. How can this possible? It is working just like RDP rather than VNC.

Even though I have logged out from VirtualBox, theVNC connection is still ON.
Can any one explain???

Manuel Bacherer

im using debian 9

i followed the guide
but cannot connect with the viewer from another computer.
Nmap says port 5901 is open and listening in the debian machine
The service is running in the debian machine.

However, i get error 10061, using tiger vnc viewer

Im not sure what im doing wrong, would love some help


Pal Whatapal

Wrong wrong wrong. That’s not how you correctly setup VNC

Kent Paul -> Pal Whatapal

Yea the best way tell that it’s wrong but say nothing about what’s wrong or link to sources…

stun ned -> Pal Whatapal

well, pal, please advise what is the right way!

You need to start vncserver with -localhost no parameter to it work first time

It would be good teach how to create /etc/init.d/vncserver to start and stop the daemon.