Installing using Windows Subsystem for Linux

After a successful build using Windows Subsystem for Linux (Bash on Ubuntu on Windows) and ./set_path, MRView does not work. It reads:

mrview: cannot connect to X server

Config and build were ok so I am unsure what the problem is here.
Anyone familiar with WSL and how to proceed from here?

MRtrix build type requested: release

Detecting OS: linux
Machine architecture set by ARCH environment variable to: native
Looking for compiler [g+±4.9]: g+±4.9 (Ubuntu 4.9.4-2ubuntu1~14.04.1) 4.9.4
Checking for C++11 compliance: ok
Checking for ::max_align_t: ok
Checking for std::max_align_t: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: yes
Checking for non-POD variable-length array support: yes
Checking for zlib compression library: 1.2.8
Checking for TIFF library: not found - TIFF support disabled
Checking for Eigen 3 library: 3.2.0
Checking JSON for Modern C++ requirements: OK
Checking shared library generation: yes
Checking for Qt moc: moc (version 4.8.6)
Checking for Qt qmake: qmake (version 4.8.6)
Checking for Qt rcc: rcc (version 4.8.6)
Checking for Qt: 4.8.6

writing configuration to file ‘./config’: ok

This is totally expected: Ubuntu Bash doesn’t provide a graphics (X11) stack. This was mentioned by @ThijsDhollander a while back in this post (although it’s a minor side comment). You might be able to get it to work using a separate standalone X server (see e.g. this post), but I doubt it: you need OpenGL 3.3 support, I’d be (pleasantly) surprised if any X server solutions out there would provide such support… This is why we are still currently using the MSYS2 install, as per the installation instructions - this provides a native Windows executable, with full graphics support.

1 Like