How to connect to SP7021 boards using VNC server

The goal of the document is to demonstrate how to connect to SP7021 boards using VNC server from a remote Linux machine. VNC connection consists of two portions. One is VNC server which is installed and run on an SP7021 board. The other is VNC viewer which is installed and run on a remote Linux machine. After installing and building VNC connection, you can connect to SP7021 board and see its desktop and control it from the remote Linux machine (VNC viewer).

To build VNC connection, you need to:

  1. Install Raspbian on SP7021 board.

  2. Install and run VNC server on SP7021 board.

  3. Install and run VNC viewer on a remote machine.

Please follow the following steps to build VNC connection.

1. Install Raspbian on SP7021 board

Refer to https://sunplus.atlassian.net/wiki/spaces/doc/pages/461045886 for installing Raspbian on an SP7021 board.

2. Install TightVNC server on SP7021 board

Before installing VNC server, please run apt update and apt upgrade commands to upgrade Raspbian to the latest. For example,

pi@raspberrypi:~$ sudo apt update pi@raspberrypi:~$ sudo apt upgrade

Then, run apt install tightvncserver command to install TightVNC server. Refer to log captured when TightVNC server was installing below:

pi@raspberrypi:~$ sudo apt install tightvncserver Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: fontconfig-config fonts-dejavu-core libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1 libfontenc1 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 libllvm9 libsensors-config libsensors5 libsm6 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 x11-common x11-utils x11-xserver-utils xfonts-base xfonts-encodings xfonts-utils Suggested packages: : : : Processing triggers for libc-bin (2.28-10+rpi1) ... Processing triggers for systemd (241-7~deb10u5+rpi1) ... Processing triggers for man-db (2.8.5-2) ... pi@raspberrypi:~$

TightVNC was installed successfully.

3. Run VNC server

Run vncserver command as shown below, where command-line option -geometry 1080x720 sets width and height of display frame-buffer of VNC server. When vncserver is running, it will ask you to enter your password for VNC viewer. It also asks if you need to set password especially for view-only.

pi@raspberrypi:~$ vncserver -geometry 1080x720 You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n xauth: file /home/pi/.Xauthority does not exist New 'X' desktop is raspberrypi:1 Creating default startup script /home/pi/.vnc/xstartup Starting applications specified in /home/pi/.vnc/xstartup Log file is /home/pi/.vnc/raspberrypi:1.log pi@raspberrypi:~$

New X desktop was created. Display number is 1. Default startup script, ~/.vnc/xstartup, and authentication for X session, ~/Xauthority, were created.

4. Install TightVNC viewer on a remote machine

At remote machine, you need to install VNC viewer. For example, in a Linux/Ubuntu machine, you can run apt install xtightvncviewer command to install TightVNC viewer. Refer to log captured when TightVNC viewer was installing below:

TightVNC viewer was installed successfully.

5. Run TightVNC viewer to connect to SP7021 board

Refer to log below, run vncviewer command.

When vncviewer is running, a serverDiaglog window will pop up. It asks you enter host name or IP address VNC server. Please enter host name or IP address of your SP7021 board.

Then, enter password (the password you set in step 3).

Once you enter password, VNC viewer starts to connect to VNC server. Refer to log captured when vncviewer is connecting to VNC server below:

VNC viewer connects to VNC server successfully. 32-bit (per pixel) format is used.

As shown below, soon, we’ll see desktop of SP7021 which is running Raspbian.