In this tutorial I’m going to show you how to run Raspberry PI OS Lite GUI applications from a Windows PC.
Sometimes it can be useful for a number of purpose to execute application with GUI in a Raspberry PI OS Lite version. With Xmin you can remote to Windows PC an X11 window, getting Raspberry PI GUI applications showed in your remote PC.
This can be useful, for example, when you need a local browser in your Raspberry PI to view pages not published, or when need to control from Windows a Linux application working only from GUI (like an x3270 terminal emulator for mainframe). Or you can play amazing games from Linux universe with a light linux box and your Windows PC exposing the GUI.
Usually people install a desktop environment in your Raspberry PI and configure a remote desktop connection. But this solution brings workload and resource usage that may be useless for you.
An alternative is using an X Server in your Windows PC together with an SSH session, then forwarding Gui applications from Raspberry PI OS to Windows. This requires in Raspberry PI OS only an X-Window, which is something far lighter than a desktop environment.
Pleasefind below the main difference between 3 graphical levels in Linux systems. Those definitions come from Wikipedia (pages referred in each item):
As usual, I suggest adding from now to your favourite e-commerce shopping cart all the needed hardware, so that at the end you will be able to evaluate overall costs and decide if to continue with the project or remove them from the shopping cart. So, hardware will be only:
We’ll need also a Windows PC.
Check hardware prices with following links:
For this step, please refer to Install Raspberry PI OS Lite. At the end, please remember to update your OS:
sudo apt update sudo apt upgrade
We use – from Linux side – the most known X-Window package in Linux universe: Xorg. From Raspberry PI terminal, type:
sudo apt install xorg
From Windows PC side, I suppose you already have Putty installed. We need to choose the X-Server which will show in Windows PC applications running in Raspberry PI. One of most known is Xming. You can download its installer from Xming Sourceforge page. Installation will be with the default settings with Windows installer downloaded.
Once started and running, you should see Xming icon in you icon tray:
In Raspberry PI OS Lite, check correct value for DISPLAY environment parameter. Type:
echo $DISPLAY
And you should receive the following:
pi@raspberrypi:~ $ echo $DISPLAY localhost:10.0
Otherwise, correct DISPLAY parameter with the following:
export DISPLAY=localhost:10.0
In Windows PC, once Xming is running, we must set Putty connection parameters to make it forwarding X11 window. From Category list (left column), go to Connection -> SSH -> X11 and configure as the picture below:
Now go from Category List (left column) in Session and configure your connection parameter. In below picture, “192.168.1.78” is my Raspberry PI address, so must be changed with your own. Port must be 22. Connection Type must be “SSH”. Saved Session Name can be whatever you want to remember your connection between other saved sessions. In my case, I’m using my Raspberry PI Zero W for this test (but works with all other Raspberry PI boards):
Now connect to your Raspberry PI terminal with this session.
Our test will go with a cool X11 game. XBill is an arcade game from 1994 in which the player has to prevent an evil computer hacker named “Bill” from installing a popular Operating System on various machines. The OS can spread over networks and purges existing systems (BSD, Solaris, SGI IRIX, …). Install it in your Raspberry PI with
wget http://http.us.debian.org/debian/pool/main/x/xbill/xbill_2.1-9_armhf.deb sudo apt install ./xbill_2.1-9_armhf.deb
And execute it with the command:
xbill
The xbill game window should appear in your Windows PC and you should be able to start a new game:
When using X11 forwarding from Raspberry PI to a Windows one, remember that you will save alla data within GUI application locally in your Linux OS. So, if you need to transfer them, you will likely use, for example, an SFTP transfer application like Filezilla.
Enjoy!
In this tutorial, I will share a DIY project to create a fully customizable solar…
In this tutorial, we will use two Arduino Uno to demonstrate the Serial Peripheral Interface…
In this tutorial, we will be making an automatic irrigation system (AIS) with Arduino and…
This tutorial will show you how to use Python Virtual Environment with Raspberry PI computer…
This tutorial will show you how to get betting odds with Raspberry PI by using…
This tutorial will show you how to perform the backup of Raspberry PI (computer board)…
View Comments
when i execute the xbill it says "segmentation fault", can you help me out a bit.
Hi Malith,
Segmentation fault is a generic error which can happen for a number of reasons, some of which are identified at . You can first try to change your power supply (be aware that smartphones chargers may bot be able to supply enough Ampere) or MicroSD card. Please let me know if this helps in fixing
For a different approach check out CloudTk for displaying Raspberry Pi X11 apps remotely in a web browser.
https://cloudtk.tcl-lang.org/page/CloudTk
Sorry it should read
https://wiki.tcl-lang.org/page/CloudTk