Is there a way to run a 3rd party qt5 statically linked app using xcb to run under Wayland.
get the following error when trying to run it in the sample debian qt5 containers provided by Toradex
root@0786e352b88f:/home/torizon/Blackmagic_Desktop_Video_Linux_12.7.1/deb/aarch64# BlackmagicDesktopVideoSetup
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
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: xcb.
Aborted (core dumped)
This will launch Qt5 container, that contains Wayland libraries and Qt5 compositor, pre-built Qt5 examples for quick evaluation, and binary drivers for Vivante GPUs (i.MX 8 modules). Please read this reference to read more: List of Container Images for Torizon | Toradex Developer Center.
Basically, I run the command based on this article Qt on Torizon OS | Toradex Developer Center. Also, you can read more about Qt on Torizon OS. I did following changes in the command:
to clarify i was using the toradex qt5-wayland-examples-vivante container
the issue is i am trying to run a precompiled 3rd party app. “blackmagic design desktop” this seems to be linked against qt binaries which only have the xcb qt platform backend. i wanted to know if there was a way to run such a binary
you can try running xcb-only applications under Wayland using xWayland and forcing Qt to use the xcb backend by setting the QT_QPA_PLATFORM="xcb" variable. You will also need to su torizon, aka, change to a non-root user inside the Qt5 container due to permissions (see the code snippet below)
If your application needs hardware acceleration, it will not work and most likely segfault.
Simple apps like xeyes that don’t make use of EGL will work
# ... inside qt5-wayland container with Weston container also running, per our documentation
root@1d5055468ccc:/lib/aarch64-linux-gnu/qt5/examples/gui/analogclock# su torizon
$ ls
analogclock analogclock.pro main.cpp
$ su torizon
$ QT_QPA_PLATFORM="xcb" ./analogclock
# ... analogclock shows up ...
Hey everyone, I believe this is not needed in BSP 6 since it is added by default, but in case XWayland is not there (ie. BSP 5), one should also modify the Weston container: