Just adding to this thread as I’ve just been struggling to get mrview running on Windows 11 running WSL1. I had been receiving the classic error:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I tried running with extended debugging (export QT_DEBUG_PLUGINS=1), but nothing obvious appeared. I tried all the other tips shared throughout this community (thanks everyone!) but also no luck. I tried other tips from across the web (e.g. ldd \wsl.localhost\Ubuntu-20.04\usr\lib\x86_64-linux-gnu\qt5\plugins\platforms\libqxcb.so) but no libraries were missing.
But in the end I was successful! The trick? This page suggested I needed to install vcxsrv, so I did, and now mrview runs!