Run on remote device
-
Several years ago I worked on a RPi-based project. I remember I could run the application from QtCreator and it was executed on the target.
Now I'm trying to do the same with a desktop pc running Ubuntu 20.04.
I created a Qt project and configured the deployment:QT += quick virtualkeyboard serialport serialbus CONFIG += c++11 SOURCES += \ main.cpp \ src/gesture.cpp RESOURCES += qml.qrc TRANSLATIONS += \ MyPorject_en_150.ts CONFIG += lrelease CONFIG += embed_translations QML_IMPORT_PATH = QML_DESIGNER_IMPORT_PATH = target.path = /home/user/bin other.path = /home/user/bin other.files = $${PWD}/config/ INSTALLS += target other HEADERS += \ QYAML.h \ src/gesture.h LIBS += -lyaml-cpp DISTFILES += \ config/devices.yaml
If I run the application from the target it works (actually there are some errors, but I'll ask for them in another thread).
Instead if I try to run within QtCreator I get:QML debugging is enabled. Only use this in a safe environment.
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.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
16:59:56: Remote process crashed.
It seems like it tries to connect to the local display instead of the remote one.
What I have to do in order to run the application remotely?To be clear: I don't want the X11 forwarding. The application window should be shown on the remote machine.
-
@Mark81 said in Run on remote device:
I don't want the X11 forwarding. The application window should be shown on the remote machine
Do you have an X server running in the remote device?
Or you can get rid of the X Window burden and run your Qt application fullscreen if compiled to support EGLFS with this command:
./your-qt-app --platform eglfs
-
I'm afraid I'm missing something stupid. It's the whole day I'm struggling to run a single Qt application.
No one platform works. I also tried with wayland or x11 (/etc/gdm3/custom.conf
).Basically I installed a clean Ubuntu Server 20.04 (no X).
Then I installed X (Gnome):sudo apt install gnome-session gdm3 sudo systemctl set-default graphical.target
I copied all the Qt6 libraries to
/usr/local/lib
, the QML files to/usr/local/lib/qml
and set theQML_IMPORT_PATH
to the same folder.Then I installed all the suggested packages I found here or in other forums:
libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev libxkbcommon-x11-dev '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev ubuntu-restricted-extras libegl1-mesa-dev
If I launch the application on the target it "tries" to run but it fails, i.e. with the
xcb
plaform I get:QML debugging is enabled. Only use this in a safe environment. QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqeglfs.so" Found metadata in lib /home/user/bin/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("eglfs") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqlinuxfb.so" Found metadata in lib /home/user/bin/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqminimal.so" Found metadata in lib /home/user/bin/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("minimal") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqminimalegl.so" Found metadata in lib /home/user/bin/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqoffscreen.so" Found metadata in lib /home/user/bin/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("offscreen") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqvkkhrdisplay.so" Found metadata in lib /home/user/bin/platforms/libqvkkhrdisplay.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vkkhrdisplay" ] }, "archreq": 0, "className": "QVkKhrDisplayIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("vkkhrdisplay") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqvnc.so" Found metadata in lib /home/user/bin/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("vnc") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-egl.so" Found metadata in lib /home/user/bin/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archreq": 0, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland-egl") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-generic.so" Found metadata in lib /home/user/bin/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archreq": 0, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-xcomposite-egl.so" Found metadata in lib /home/user/bin/platforms/libqwayland-xcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-egl" ] }, "archreq": 0, "className": "QWaylandXCompositeEglPlatformIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland-xcomposite-egl") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-xcomposite-glx.so" Found metadata in lib /home/user/bin/platforms/libqwayland-xcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-glx" ] }, "archreq": 0, "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland-xcomposite-glx") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqxcb.so" Found metadata in lib /home/user/bin/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archreq": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("xcb") loaded library "/home/user/bin/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/platforminputcontexts" ... Found metadata in lib /usr/local/lib/qml/QtQuick/libqtquick2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuick2Plugin", "debug": false, "uri": [ "QtQuick" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/libqtquick2plugin.so" Found metadata in lib /usr/local/lib/qml/QtQml/WorkerScript/libworkerscriptplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archreq": 0, "className": "QtQmlWorkerScriptPlugin", "debug": false, "uri": [ "QtQml.WorkerScript" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQml/WorkerScript/libworkerscriptplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Controls/libqtquickcontrols2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickControls2Plugin", "debug": false, "uri": [ "QtQuick.Controls" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Controls/libqtquickcontrols2plugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickControls2MaterialStylePlugin", "debug": false, "uri": [ "QtQuick.Controls.Material" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickControls2BasicStylePlugin", "debug": false, "uri": [ "QtQuick.Controls.Basic" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/VirtualKeyboard/libqtquickvirtualkeyboardplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickVirtualKeyboardPlugin", "debug": false, "uri": [ "QtQuick.VirtualKeyboard" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/VirtualKeyboard/libqtquickvirtualkeyboardplugin.so" Found metadata in lib /usr/local/lib/qml/QtMultimedia/libquickmultimediaplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archreq": 0, "className": "QMultimediaQuickModule", "debug": false, "uri": [ "QtMultimedia" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtMultimedia/libquickmultimediaplugin.so" Found metadata in lib /usr/local/lib/qml/Qt5Compat/GraphicalEffects/libqtgraphicaleffectsplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtGraphicalEffectsPlugin", "debug": false, "uri": [ "Qt5Compat.GraphicalEffects" ], "version": 393728 } loaded library "/usr/local/lib/qml/Qt5Compat/GraphicalEffects/libqtgraphicaleffectsplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Window/libquickwindowplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archreq": 0, "className": "QtQuick_WindowPlugin", "debug": false, "uri": [ "QtQuick.Window" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Window/libquickwindowplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Templates/libqtquicktemplates2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickTemplates2Plugin", "debug": false, "uri": [ "QtQuick.Templates" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Templates/libqtquicktemplates2plugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/xcbglintegrations" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/accessiblebridge" ... QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled QRhiGles2: Failed to create temporary context QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled QRhiGles2: Failed to create context Failed to create RHI (backend 2) Failed to initialize graphics backend for OpenGL.
instead for
eglfs
:QML debugging is enabled. Only use this in a safe environment. QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqeglfs.so" Found metadata in lib /home/user/bin/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("eglfs") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqlinuxfb.so" Found metadata in lib /home/user/bin/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqminimal.so" Found metadata in lib /home/user/bin/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("minimal") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqminimalegl.so" Found metadata in lib /home/user/bin/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqoffscreen.so" Found metadata in lib /home/user/bin/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("offscreen") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqvkkhrdisplay.so" Found metadata in lib /home/user/bin/platforms/libqvkkhrdisplay.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vkkhrdisplay" ] }, "archreq": 0, "className": "QVkKhrDisplayIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("vkkhrdisplay") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqvnc.so" Found metadata in lib /home/user/bin/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("vnc") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-egl.so" Found metadata in lib /home/user/bin/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archreq": 0, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland-egl") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-generic.so" Found metadata in lib /home/user/bin/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archreq": 0, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-xcomposite-egl.so" Found metadata in lib /home/user/bin/platforms/libqwayland-xcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-egl" ] }, "archreq": 0, "className": "QWaylandXCompositeEglPlatformIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland-xcomposite-egl") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqwayland-xcomposite-glx.so" Found metadata in lib /home/user/bin/platforms/libqwayland-xcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-glx" ] }, "archreq": 0, "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("wayland-xcomposite-glx") QFactoryLoader::QFactoryLoader() looking at "/home/user/bin/platforms/libqxcb.so" Found metadata in lib /home/user/bin/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archreq": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 393728 } Got keys from plugin meta data QList("xcb") loaded library "/home/user/bin/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/platforminputcontexts" ... Found metadata in lib /usr/local/lib/qml/QtQuick/libqtquick2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuick2Plugin", "debug": false, "uri": [ "QtQuick" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/libqtquick2plugin.so" Found metadata in lib /usr/local/lib/qml/QtQml/WorkerScript/libworkerscriptplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archreq": 0, "className": "QtQmlWorkerScriptPlugin", "debug": false, "uri": [ "QtQml.WorkerScript" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQml/WorkerScript/libworkerscriptplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Controls/libqtquickcontrols2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickControls2Plugin", "debug": false, "uri": [ "QtQuick.Controls" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Controls/libqtquickcontrols2plugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickControls2MaterialStylePlugin", "debug": false, "uri": [ "QtQuick.Controls.Material" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickControls2BasicStylePlugin", "debug": false, "uri": [ "QtQuick.Controls.Basic" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/VirtualKeyboard/libqtquickvirtualkeyboardplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickVirtualKeyboardPlugin", "debug": false, "uri": [ "QtQuick.VirtualKeyboard" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/VirtualKeyboard/libqtquickvirtualkeyboardplugin.so" Found metadata in lib /usr/local/lib/qml/QtMultimedia/libquickmultimediaplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archreq": 0, "className": "QMultimediaQuickModule", "debug": false, "uri": [ "QtMultimedia" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtMultimedia/libquickmultimediaplugin.so" Found metadata in lib /usr/local/lib/qml/Qt5Compat/GraphicalEffects/libqtgraphicaleffectsplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtGraphicalEffectsPlugin", "debug": false, "uri": [ "Qt5Compat.GraphicalEffects" ], "version": 393728 } loaded library "/usr/local/lib/qml/Qt5Compat/GraphicalEffects/libqtgraphicaleffectsplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Window/libquickwindowplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archreq": 0, "className": "QtQuick_WindowPlugin", "debug": false, "uri": [ "QtQuick.Window" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Window/libquickwindowplugin.so" Found metadata in lib /usr/local/lib/qml/QtQuick/Templates/libqtquicktemplates2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "archreq": 0, "className": "QtQuickTemplates2Plugin", "debug": false, "uri": [ "QtQuick.Templates" ], "version": 393728 } loaded library "/usr/local/lib/qml/QtQuick/Templates/libqtquicktemplates2plugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/xcbglintegrations" ... qrc:/qml/items/BtnFile.qml:8:5: QML Image: Cannot open: file:///home/marcotrapanese/Scaricati/headphones.svg qrc:/qml/items/BtnFile.qml:8:5: QML Image: Cannot open: file:///home/marcotrapanese/Scaricati/headphones.svg QFactoryLoader::QFactoryLoader() checking directory path "/home/user/bin/accessiblebridge" ... QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled QRhiGles2: Failed to create temporary context QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled QRhiGles2: Failed to create context Failed to create RHI (backend 2) Failed to initialize graphics backend for OpenGL.
What is driving me crazy is I have the dev machine with the same Ubuntu 20.04 and all works fine!
I really don't understand what is missing and how to find it.
ldd
finds all the libraries. -
@Mark81 said in Run on remote device:
Cannot create platform OpenGL context, neither GLX nor EGL are enabled
I don't think you have an
ldd
library problem. I think this line is what you are interested in. If you Google for this there are plenty of hits, though it means nothing to me? -
@JonB said in Run on remote device:
Cannot create platform OpenGL context, neither GLX nor EGL are enabled
I'vw already searched for this error but I found a lot of questions or hints rather than answers. Anyway I tried some of the hints (like the packages above) with no luck.
I would like to understand what this error means and how to fix without trying to apply this or that suggestion.
I read the docs about deployment but I didn't find a clear list of the requested libraries on a clean environment.