In this config we will show a quick VNC server/client configuration on Debian Linux Jessie 8. Visit the following page on how to configure VNC on Debian 9 Stretch Linux.
We will be using vnc4server
to start a VNC server and xvnc4viewer
client to connect remotely. First perform a server installation on the server you wish to remotely connect to:
# apt-get install vnc4server
Next, setup your password. Login as a user you will eventually use to create a remote VNC session and set your password consisting of 6 – 8 characters:
$ vnc4passwd Password: Verify:
At this point you can start VNC server. In the example below have startted VNC server with 800×600 screen resolution and 24 pixel depth:
$ vnc4server -geometry 800x600 -depth 24 New 'debian:1 (lubos)' desktop is debian:1 Creating default startup script /home/lubos/.vnc/xstartup Starting applications specified in /home/lubos/.vnc/xstartup Log file is /home/lubos/.vnc/debian:1.log
Once you have started your VNC server you can use your VNC viewer to connect to it. On Debian Linux you can use xvnc4viewer
for this job:
# apt-get install xvnc4viewer
Next, open a new VNC session:
$ xvnc4viewer 10.1.1.12:1
where 10.1.1.12
is an IP address of your previously started VNC server and 1
is a desktop number. The result will look similar to the one below:

The VNC session started with a bare minimum of applications. To start VNC server with KDE GUI as an example you need to change your VNC start up script. First kill currently running VNC desktop number
1
:
$ vnc4server -kill :1
Next, edit your ~/.vnc/xstartup
script to include the following lines:
#!/bin/sh startkde &
Next time you start new VNC desktop the KDE will run as a default application.