Skip to content
Jonathan Hudson edited this page Jun 1, 2024 · 1 revision

Intro

Unmaintained Article

As a result of user interest in running mwp on Windows 10 / WSL (see RC Groups and Github issue), here's an experiment to see if it's possible. By a Windows neophyte, so if I can install mwp on WSL, anyone can.

NOTE This article refers to Win10/WSL2. mwp may also be installed in Win11/WSL-G.

  • Win11/WSL-g is a much better solution, if you can meet the Win11 hardware requirements. Pretty much everything works in Win11/WSL-g without the limitations listed below.

Environment

Windows 10 VM hosted on Arch Linux.

WSL Installation

The VM came with WSL / Ubuntu 18.04-2 already installed. The installation / invocation of WSL in native Windows 10 is well documented, so there's nothing more to add here.

Windows / WSL Pre-requisites

As mwp requires a X server, it is necessary to install a Windows' X server. MobaXterm or Vcxsvr.

For this experiment:

  • MobaXterm cau use hardware OpenGL; alternatively
  • Vcxsrv was configured as:
    • disable native OpenGL
    • Multiple Windows
    • Start no client

Allow connections in the Windows firewall for the local network. Do this for any subsequent Windows firewall dialogues as well.

As a result of the decision to disable native OpenGL, the following package was installed in the WSL instance:

sudo apt install mesa-utils

(note: this may or may not be the best solution)

WSL / Linux pre-requisites

In order to address some issues of WSL v. a native / VM Linux install, the following packages were installed in WSL/Linux:

sudo apt install dbus-x11
sudo apt install libxml2-utils

mwp Installation

The Microsoft VM had git pre-installed in WSL, if this is not the case, then it will be necessary to install it.

sudo apt install git

Note: /etc/sudoers (via visudo) was edited to allows the WSL user to run commands as root without asking for a password.

Then it was just a case of cloning the mwp repository and following mwp's instructions (mwptools/docs/debian-ubuntu-dependencies.txt), to install the dependencies, thusly:

cp mwptools/docs/debian-ubuntu-dependencies.txt /tmp/u.sh
chmod +x /tmp/u.sh
# edit /tmp/u.sh for any optional items ...
sudo /tmp/u.sh Y # 'Y' bypasses interactive query / responses

Then build and install mwp and optionally the blackbox tools (as mwptools/docs/debian-ubuntu-dependencies.txts.txt).

Running mwp

There are a couple of things that are necessary, either a one-off or on each restart of WSL.

On each restart of WSL

Set the DISPLAY (you can add this to .bashrc).

export DISPLAY=WINDOWS_HOST_IP:0

It appears necessary to manually start the dbus service:

 sudo service dbus start

Note: There are various hacks described on the internet to automate this.

One off changes

Due to limitations of the Windows window manager running X applications, and in particular font differences, it is necessary to reduce the font scaling in the mwp 'Flight View' docklet.

gsettings set org.mwptools.planner font-fv 10
# if you still have resizing problems, try 9 ....

Note: Contrary to the reports in #52, this works (at least if you've started the dbus service).

It is probably also wise to remove the NetworkManager dependency:

gsettings  set org.mwptools.planner ignore-nm  true

Then you can run mwp.

mwp

The screenshot shows it replaying a blackbox log.

mwp on WSL

Limitations

  • Bugs in WSL/Ubuntu (that are not in native Ubuntu), causing crashes.
  • Interaction with the UI sucks, in particular resizing dock panels is a bit 'hit and miss'
  • Auto-detection of serial devices is unlikely to work; in WSL2 even using a serial port may not be possible. See the mwp Win11/WSL-g installation article for the ser2udp workaround. This should work in Win10 as well.
  • If you want audio, please research the well documented Windows's pulseaudio hacks --- it works (sort of).

Summary

  • Compared to native Linux (or even a Linux guest VM in a Windows host or Cygwin), it's a frustrating experience, largely due to interaction with the window manager (which is not a advertised / vendor supported WSL capability), audio etc.
  • Ultimately, interesting experiment, but not usable for anything serious.
  • Cygwin is a better solution for running mwp in Windows 10.
  • Win11 / WSL2-g is a much better option than Win10 /WSL.
Clone this wiki locally