Číst česky →

Simple VNC server/client on Debian Jessie 8

1 min read Petr Pomajbík Linux Basics VPS

In this tutorial we will look at configuring a simple VNC server on Debian Jessie. This tutorial will also work on other Debian-based Linux distributions.

In this tutorial we will configure vnc4server as the server part and use xvnc4viewer as the client.

First we install the VNC server "vnc4server":

apt-get install vnc4server

Then we set the VNC password with the command:

vnc4passwd

The password should be between 6 - 8 characters long.

In the next step, we start the VNC server with a resolution of, say, 800x600 pixels and 24-bit color depth:

vnc4server -geometry 800x600 -depth 24

Now all we need to do is install the VNC client:

apt-get install xvnc4viewer

In the shell, specify the connection to the server IP (our IP in the example is 192.168.1.12):

xvnc4viewer 192.168.1.12:1

VNC sends the screen and the password unencrypted, and vnc4server listens on all server addresses (port 5901). If the server is reachable from the internet, connect through an SSH tunnel instead: on the client run ssh -L 5901:localhost:5901 user@192.168.1.12 and then xvnc4viewer localhost:1.