How to connect to SP7021 boards using X server

The goal of the document is to demonstrate how to install X11 display server of Xming on a Windows machine and build X server connection to an SP7021 board. With X server connection, you can run desktop environment application, X applications and control them from a remote Windows machine.

To build connection between a SP7021 board and a Windows machine, you need to:

  1. Install Raspbian on SP7021 board.

  2. Install and run PuTTY on remote Windows machine. PuTTY helps connect to SP7021 board and forward X11 packets using ssh (secure shell) protocol.

  3. Install and run Xming on remote Windows machine . Xming is an X11 display server which runs on a Windows machine.

  4. Install Xming-fonts on remote Windows machine. Xming-fonts provides fonts of X server.

Please follow the following steps.

1. Install Raspbian on SP7021

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

2. Enable SSH service of Raspbian

SSH service is disabled in Raspbian by default. There are two methods to enable it. One is simply to place an empty file named ssh (without any extension) in boot partition. SSH service will be enabled when Raspbian boots first time (The empty file, ssh, will then be removed.).

The other is to run systemctl commands as shown below:

pi@raspberrypi:~$ sudo systemctl enable ssh pi@raspberrypi:~$ sudo systemctl start ssh

You can also use systemctl command to check the status of ssh service. For example,

pi@raspberrypi:~$ systemctl status ssh ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2021-01-17 13:39:53 GMT; 2min 0s ago Docs: man:sshd(8) man:sshd_config(5) Process: 1409 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS) Main PID: 1418 (sshd) Tasks: 1 (limit: 1191) Memory: 2.8M CGroup: /system.slice/ssh.service mq1418 /usr/sbin/sshd -D Jan 17 13:39:48 raspberrypi systemd[1]: Starting OpenBSD Secure Shell server... Jan 17 13:39:53 raspberrypi sshd[1418]: Server listening on 0.0.0.0 port 22. Jan 17 13:39:53 raspberrypi sshd[1418]: Server listening on :: port 22. Jan 17 13:39:53 raspberrypi systemd[1]: Started OpenBSD Secure Shell server. pi@raspberrypi:~$

ssh is loaded and running now.

3. Download and install PuTTY

Download PuTTY from web https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html. Refer to screenshot of the web below, please choose either 32-bit or 64-bit PuTTY to install.

After it has downloaded, install it.

4. Setup PuTTY

Run PuTTY from Window Start menu or desktop. When PuTTY Configuration window pops up, click “Connection” → “SSH” → “X11” in Category sub-window. Enable X11 forwarding, enter “localhost:0” for X display location, and select “MIT-Magic-Cookie-1” button. Refer to screenshot below:

 

Next, click “Session” in Category sub-window, enter your host name or IP address, select SSH button for connect type. Refer to screenshot below:

Next, enter “SP7021 Raspbian” for “Saved Sessions” and press Save button to save current configuration. Refer to screenshot below:

Next time, you can load saved configuration directly.

5. Run PuTTY and log in Raspbian of SP7021 board

Press “Open” to start to connect to SP7021 board.

Enter your user name and password to log in Raspbian of SP7021 board.

6. Download and install Xming and Xming-fonts on Windows machine

Download and install Xming (V6.9.0.31) and Xming-fonts (7.7.0.10) from web, for example, https://sourceforge.net/. Refer to screenshot of SOURCEFORGE.

Click “Download Latest Version Xming-6-9-0-31-setup.exe (2.2MB)” and “Xming-fonts-7-7-0-10-setup.exe” respectively to download and install Xming and Xming-fonts.

7. Run XLaunch

Click Windows Start menu and run XLaunch

When “Display settings” dialog box of XLaunch pops up, you can choose how Xming displays X applications. Refer to screenshot below, please choose Fullscreen because we want to run LXDE session (a desktop environment) later. Enter “0” for Display Number. Then, press Next button to go to next step.

After you press Next button, “Session type” dialog box is shown. Because we want to start X applications in PuTTY manually, please choose “Start no client” and then press Next.

After you press Next button, “Additional parameters” dialog box is shown. Check “Clipboard” check box and then press Next button.

After you press Next button, “Finish configuration” dialog box is shown. You can press “Save configuration” button to save above settings. Finally, press “Finish” button to start Xming.

After Xming starts up, you’ll see a blank desktop on Windows' desktop.

8. Run startlxde

Press “Alt+Tab” to switch to PuTTY and run startlxde command. Refer screenshot below:

LXDE session has run successfully. Switching to Xming, you’ll see LXDE desktop environment as shown below:

You are now ready to use any X applications, including LXTerminal, using LXDE desktop.