Armbian: access the Orange Pi with VNC remote desktop [Exclusive Guide]

2:07 pm January 13, 201715042

Orange Pi (and Raspberry Pi) are mini computers cards that are very often used remotely without screen (keyboard and mouse). In some cases, or if you start on Linux, we would however with graphical access to the Linux desktop. In this tutorial we will learn how to install and configure a VNC server (Virtual Network Computing) on the Armbian distribution that is very well suited to the Orange Pi .

TightVNC ( official page of the project ) is a lightweight VNC server that runs on all Linux distributions as well as on Windows. Before installing, it is best to update the system.

when it is finished, install TightVNC.

it is possible to connect to your Orange ‘ or ‘ Raspberry with your usual user but by security It is better to add a dedicated user.

change user to be root (if this isn’t the case).

Add a new user to the system with the command adduser ( adduser vnc ) and answer the questions (password, optional questions).

we give this user the right to use the sudo command (if you want to be able to install new packages remotely).

change user

now we start the VNC server on port 1. At first launch, you will need to specify the password required to authenticate from a client.

know the parameters of the Active Server

If you need to know the current active VNC server parameters, run the command following

helps to know on which port the flow is returned (-rfbport), the resolution of the image (-geometry)…

stop a VNC server

to stop a VNC server, use the following command followed by the screen. 1 by default

there are very many VNC clients for all platforms (Mac OS, Windows, Linux…) and for smartphone (iOS, Android,…). RealVNC ( website ) is available on all platforms (including mobile). It is free for personal use. If you prefer to stay in the projects 100% Open Source and free, guarantee of respect for private life, you can turn to UltraVNC ( project official page).

start your client and enter the IP address of your Orange PI (or any VNC server) follow-up of the port on which is started this last. By default this will be 5901.

which gives for example 192.168.1.90 : 5901

by default, the connection is not encrypted. Is not very annoying when it connects to a post on its own network but be careful if you access your desktop remotely because everything will pass in clear on internet…

accept the warning message.

realvnc-avertissement-connexion-non-cryptee

you are now connected to your office.

tightvnc vnc armbian orange pi lite

Let’s start by stop the server running

we will create a new script which will be executed at startup like any other service.

Collez le contenu dans le script. This script contains three commands: start, stop (stop) and reboot (restart) the VNC server. (

save with CTRL + X then y.

we make this script executable

you can now run the commands suggested by this script manually like this

now, add a script (Unit leader) that will allow to manage VNC as a service with systemd.

then paste this script

we relaunch systemd to take into account the new service. Then we start the VNC server using systemd

now we have 4 commands to start, stop, re – start and the status (status) of the VNC service.

we will now secure the connection by connecting through an SSH tunnel. It is gone.

first stop the service.

Puis on ouvre le fichier de configuration

Modifiez la ligne OPTIONS by adding the option – localhost at the end like this

save with CTRL + X then y.

and finally we restart the VNC service.

open a secure SSH tunnel

to access securely, we already create a SSH tunnel through which we’ll pass all the exchanges between the client and the server. On Windows, you can use Putty, on macOS or Linux, it will use the Terminal simply.

on Putty, in the left menu, go to Connection-> SSH-> Tunnels .

in section Add New Forwarded Port , enter 5901 in Source port field and localhost:5901 as Destination . Click the button Add to complete

putty windows tunnel ssh

on macOS or Linux, run the following command and enter your password.

now , in your VNC client, change the IP address of the VNC server by localhost:5901 . Don’t take no account of the warning message, the connection is not secure between your computer and your computer! What comes out (and back) everything now in the SSH tunnel.