XnView on WSL2: Could not load the Qt platform

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
dric512
Posts: 4
Joined: Tue Sep 03, 2024 7:14 pm

XnView on WSL2: Could not load the Qt platform

Post by dric512 »

I have WSL2 installed on Windows 11 and try to launch XnView directly from WSL. The goal is to open scripts which are on the Linux side.

I have been able to run it on a previous laptop, but although I was able to install the .deb file and fixed missing dependencies, when I launch it I have the following message:

Code: Select all

0.29.0 (git 9b548e5) - Multimedia Development Kit. Copyright (c) 2016-2024 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Linux x86_64; glibc2.24/2.39 libc++190000; Clang19.0.0 (++20240702031426+43b988821423-1~exp1~20240702151527.1781); 04:26:03 Jul  3 2024
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.

Available platform plugins are: linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
I guess this is because I am missing some packages, but can't find which ones?
I can open other GUI applications with no issue.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView on WSL2: Could not load the Qt platform

Post by xnview »

do you start xnview.sh?
Pierre.
dric512
Posts: 4
Joined: Tue Sep 03, 2024 7:14 pm

Re: XnView on WSL2: Could not load the Qt platform

Post by dric512 »

No directly `/usr/bin/xnview`.

I installed `qt6-base-dev` and now it opens correctly, not sure why it makes a difference.
Post Reply