You are on page 1of 3

Running ARGoS on Windows through WSL

Raffaele Todesco
rtodesco@ulb.be

November 2020
1 Requirements
To be able to run Windows Subsystem for Linux, you need to be on Windows 10 build 1903 or higher. To
check your Windows 10 build version, open a Powershell prompt and use the winver command.

2 Installing WSL

2.1 Enabling the Windows Subsystem for Linux

You must first enable the "Windows Subsystem for Linux" optional feature before installing any Linux
distributions on Windows.
Open PowerShell as Administrator and run:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Microsoft suggests to upgrade to WSL2, but WSL1 perfectly runs ARGoS.

2.2 Installing a Linux distribution

Head to the Microsoft Store and install any Linux distribution (Ubuntu 20.04 LTS is recommended and
working, you can find it here : https://www.microsoft.com/fr-fr/p/ubuntu/9nblggh4msv6?activetab=
pivot:overviewtab).

2.3 Linux distribution setup

The first time you launch a newly installed Linux distribution, a console window will open and you’ll be
asked to wait for a minute or two for files to de-compress and be stored on your PC. All future launches
should take less than a second.
You will then need to create a user account and password for your new Linux distribution.
You’re good! You’ve successfully installed and set up a Linux distribution that is completely integrated with
your Windows operating system. You can already install and compile ARGoS in this environment.

3 Installing an X server to get a graphical interface


If you install an X server application on your Windows desktop and change a setting in the Bash shell,
applications will send their graphical output to the X server application and they’ll appear on your Windows
desktop.

1
You can install Xming(https://sourceforge.net/projects/xming/), a good X server for Windows. Just
accept the default settings. It will then automatically launch and run in your system tray, waiting for you
to run graphical programs.
After installation you’ll need to set the DISPLAY environment variable to point at the X server already running
on your system.
First run the following command in the Bash environment to set the DISPLAY variable in your .bashrc file:

echo "export DISPLAY=:0" >> /.bashrc

source /.bashrc

You can now run ARGoS experiments and it will open its GUI in your Windows environment.
If display is not found, use your IP in the DISPLAY variable :

echo "export DISPLAY=<your Windows computer IPv4>:0" >> /.bashrc

source ~/.bashrc

OpenGL fixes

If you have OpenGL errors (makeCurrent() fails for example), make sure that :

• you have export LIBGL_ALWAYS_INDIRECT= in ~/.bashrc

• you UNCHECK native opengl support when starting VcXsrv

You might also like