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 vnc4serverNext, 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 800x600 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.logOnce 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 xvnc4viewerNext, open a new VNC session:
$ xvnc4viewer 10.1.1.12:1where
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: 
1
: $ vnc4server -kill :1Next, 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.