This tutorial explains a straightforward method to run the LVGL PC simulator on Windows 10. While there are several ways to launch the simulator — including the native PC simulator, Qt Creator, and Code::Blocks — some users experience difficulties getting these working on Windows 10. This guide provides a reliable alternative using Windows Subsystem for Linux (WSL) and VcXsrv.
Required Software#
You'll need to install two programs:
- Windows Subsystem for Linux (WSL): Allows Linux programs to run natively on Windows without a virtual machine.
- VcXsrv: An X Server implementation for Windows that allows Unix systems to display graphical applications.
Required Dependencies#
After installing WSL and VcXsrv, you'll need to install several dependencies from within the WSL terminal:
- SDL2: Install the dependencies as explained in the LVGL PC simulator documentation for Linux.
- Additional dependencies: Install the packages listed in the Dockerfile from the LVGL PC simulator repository.
If you want a complete Ubuntu desktop experience with Eclipse running in a Linux environment from Windows, you can install the xfce desktop. This guide doesn't cover that setup, but the linked tutorial provides clear instructions.
Running the Simulator#
Once everything is installed, follow these steps:
1. Build the Project#
From your WSL terminal, navigate to the PC simulator directory and build the project:
makebashWait for the build process to complete.
2. Configure and Launch XLaunch#
Open XLaunch and configure it with these settings:
- Choose One large window
- Set the display number to
-1 - Leave all other settings at their defaults
- Finish the configuration
3. Run the Demo#
From the WSL terminal, execute the demo:
./demobash
You should now see the LVGL simulator window appear, ready for development and testing.
Why This Method Works#
This approach combines the simplicity of Linux development tools with the convenience of Windows 10. WSL provides a genuine Linux environment without the overhead of a virtual machine, while VcXsrv handles the graphical display. This setup is particularly useful when other Windows-native simulator options encounter compatibility issues.
