Installation of DUNE on Windows systems via WSL

WSL setup

Windows users should use the Windows Subsystem for Linux (WSL) and install the latest Ubuntu LTS on it. Once Ubuntu is installed proceed with installing the Dune binary packages or by using pip and the packages from PyPi or by installing from source.

In order to connect graphical output of the WSL to the Windows desktop one has to modify the .bashrc file in the home directory inside the WSL. Simply use nano to edit the file:

nano $HOME/.bashrc

Scroll to the end of this file and add these two lines:

export DISPLAY=$(/sbin/ip route | awk '/default/ { print $3 }'):0
export LIBGL_ALWAYS_INDIRECT=1

Save with Ctrl-S and quit the editor with Ctrl-X.

To activate this new configuration the WSL should simply be restarted (close the terminal and start again).

For older versions of WSL (version 1) you should also install a X-server (e.g. VcXsrv) in order to connect graphical output from the WSL Ubuntu system to your Windows desktop.

VcXsrv setup

Note: This setup of VcXsrv seems not necessary on Windows 11 clients. You still might have to adjust your .bashrc file (see above).

When using the Windows Subsystem for Linux one may wants to install a X-server for connecting the graphical output of the WSL to the Windows desktop. VcXsrv has been reported to work fine. Once installed there should be a program called XLaunch.

After installation there are a couple of configuration tweaks that have to be done in order for it to work correctly. When using XLaunch for the first time select Multiple Windows, then Start no client, then All extra settings and Disable access control. After this save the configuration somewhere easily accessible, e.g. on the desktop.

Double clicking on the configuration file will start a client. After starting a client there should be a firewall message. Private and global access for VcXsrv has to be granted.

The last step is to adjust the configuration inside the WSL Linux system (see above).

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 6, 23:25, 2024)