Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.

    Installation and Deployment
    4
    14
    327
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      StrandedFox last edited by StrandedFox

      Full error report

      /var/www/script.php:33:string '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, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

      Aborted (core dumped)
      ' (length=453)

      ############################################################

      Hello, after about a day of searches on Google I decided to ask for your guidance here.

      I am currently trying to start an application I wrote in QT via (ver. 7.4) PHP's exec() command. I'm running on Ubuntu 20.04.1 LTS on a Virtual Machine (VirtualBox)
      The application has been deployed via linuxdeployqt-5 and has its dependencies inside the folder with the exe.

      This is the php command inside the script: exec("/home/virtual-tertius/Desktop/DEPLY_VISION/Dwarf_Vision", $out, $return);

      This is the command I used to get the stderr log.
      $process = proc_open('/home/virtual-tertius/Desktop/DEPLY_VISION/Dwarf_Vision', $descriptorspec, $pipes, dirname(FILE), null);

      Running the app via Ubuntu GUI or CLI works just fine.

      I tried offering ownership to www-data (that's the user I recieved when I used 'whoami' command) but maybe I didn't apply this to all needed files.

      I'm currently stuck with my project and have no idea how to move on. Your help would be greatly appreciated! Thank you.

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @StrandedFox last edited by JonB

        @StrandedFox
        I don't know what you found on the Internet as there are millions of hits, but every time you get

        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
        

        or similar the answer is always: set environment variable QT_DEBUG_PLUGINS=1, run your Qt app, look at the end of the diagnostic output for the reason.

        qt.qpa.xcb: could not connect to display

        I'm only guessing, but since this indicates your Qt app needs xcb/X11/an X display, how is this going to work from a non-interactive PHP session?

        1 Reply Last reply Reply Quote 2
        • S
          StrandedFox last edited by

          Yes indeed I found a lot of results on this. Applied some of the solutions suggested, but none seemed to have any effect.

          I've also enabled QT_DEBUG_PLUGINS=1, but forgot to post the results, sorry!

          ###############################################################

          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "eglfs"
          ]
          },
          "archreq": 0,
          "className": "QEglFSIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("eglfs")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "linuxfb"
          ]
          },
          "archreq": 0,
          "className": "QLinuxFbIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("linuxfb")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "minimal"
          ]
          },
          "archreq": 0,
          "className": "QMinimalIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("minimal")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "minimalegl"
          ]
          },
          "archreq": 0,
          "className": "QMinimalEglIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("minimalegl")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "offscreen"
          ]
          },
          "archreq": 0,
          "className": "QOffscreenIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("offscreen")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqvnc.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqvnc.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "vnc"
          ]
          },
          "archreq": 0,
          "className": "QVncIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("vnc")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/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": 331520
          }

          Got keys from plugin meta data ("wayland-egl")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "wayland"
          ]
          },
          "archreq": 0,
          "className": "QWaylandIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("wayland")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/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": 331520
          }

          Got keys from plugin meta data ("wayland-xcomposite-egl")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/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": 331520
          }

          Got keys from plugin meta data ("wayland-xcomposite-glx")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
          "Keys": [
          "xcb"
          ]
          },
          "archreq": 0,
          "className": "QXcbIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/platforms" ...
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so"
          loaded library "Xcursor"
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platformthemes" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
          "MetaData": {
          "Keys": [
          "gtk3"
          ]
          },
          "archreq": 0,
          "className": "QGtk3ThemePlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("gtk3")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
          "MetaData": {
          "Keys": [
          "xdgdesktopportal",
          "flatpak",
          "snap"
          ]
          },
          "archreq": 0,
          "className": "QXdgDesktopPortalThemePlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("xdgdesktopportal", "flatpak", "snap")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/platformthemes" ...
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so"
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforminputcontexts" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
          "MetaData": {
          "Keys": [
          "compose",
          "xim"
          ]
          },
          "archreq": 0,
          "className": "QComposePlatformInputContextPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("compose", "xim")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
          "MetaData": {
          "Keys": [
          "ibus"
          ]
          },
          "archreq": 0,
          "className": "QIbusPlatformInputContextPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("ibus")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/platforminputcontexts" ...
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/styles" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/styles" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/iconengines" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so, metadata=
          {
          "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
          "MetaData": {
          "Keys": [
          "svg",
          "svgz",
          "svg.gz"
          ]
          },
          "archreq": 0,
          "className": "QSvgIconPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("svg", "svgz", "svg.gz")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/iconengines" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "gif"
          ],
          "MimeTypes": [
          "image/gif"
          ]
          },
          "archreq": 0,
          "className": "QGifPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("gif")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "icns"
          ],
          "MimeTypes": [
          "image/x-icns"
          ]
          },
          "archreq": 0,
          "className": "QICNSPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("icns")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "ico",
          "cur"
          ],
          "MimeTypes": [
          "image/vnd.microsoft.icon",
          "image/vnd.microsoft.icon"
          ]
          },
          "archreq": 0,
          "className": "QICOPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("ico", "cur")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "jpg",
          "jpeg"
          ],
          "MimeTypes": [
          "image/jpeg",
          "image/jpeg"
          ]
          },
          "archreq": 0,
          "className": "QJpegPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("jpg", "jpeg")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "svg",
          "svgz"
          ],
          "MimeTypes": [
          "image/svg+xml",
          "image/svg+xml-compressed"
          ]
          },
          "archreq": 0,
          "className": "QSvgPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("svg", "svgz")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "tga"
          ],
          "MimeTypes": [
          "image/x-tga"
          ]
          },
          "archreq": 0,
          "className": "QTgaPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("tga")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "tiff",
          "tif"
          ],
          "MimeTypes": [
          "image/tiff",
          "image/tiff"
          ]
          },
          "archreq": 0,
          "className": "QTiffPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("tiff", "tif")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "wbmp"
          ],
          "MimeTypes": [
          "image/vnd.wap.wbmp"
          ]
          },
          "archreq": 0,
          "className": "QWbmpPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("wbmp")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so, metadata=
          {
          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
          "MetaData": {
          "Keys": [
          "webp"
          ],
          "MimeTypes": [
          "image/webp"
          ]
          },
          "archreq": 0,
          "className": "QWebpPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("webp")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/imageformats" ...
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so"
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so"
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          libpng warning: iCCP: known incorrect sRGB profile
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
          "MetaData": {
          "Keys": [
          "xcb_egl"
          ]
          },
          "archreq": 0,
          "className": "QXcbEglIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("xcb_egl")
          QFactoryLoader::QFactoryLoader() looking at "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so"
          Found metadata in lib /home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata=
          {
          "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
          "MetaData": {
          "Keys": [
          "xcb_glx"
          ]
          },
          "archreq": 0,
          "className": "QXcbGlxIntegrationPlugin",
          "debug": false,
          "version": 331520
          }

          Got keys from plugin meta data ("xcb_glx")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/xcbglintegrations" ...
          loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so"
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/accessible" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/accessible" ...
          Draw function took 111 miliseconds.
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/accessiblebridge" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/home/virtual-tertius/Desktop/DEPLY_VISION/accessiblebridge" ...

          ##############################################################

          Wouldn't the command just start the app on the server? The app will need to take an argument upon invocation and will produce a PNG.
          Not interested in the GUI for this step of the project.

          jsulm JonB 2 Replies Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @StrandedFox last edited by

            @StrandedFox said in PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.:

            Not interested in the GUI for this step of the project.

            Then you should implement your app as Qt console app. Such an application will not require anything related to GUI and X11.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 3
            • JonB
              JonB @StrandedFox last edited by

              @StrandedFox said in PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.:

              loaded library "/home/virtual-tertius/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so"

              @jsulm has beaten me to it (as usual)! I think the above line is telling you it's going for some kind of xcb, but your server application has no xcb/X11/X display accessible to it, hence the final error qt.qpa.xcb: could not connect to display.

              You must design/link as a non-UI application for this, and cannot make any calls which demand a UI.

              1 Reply Last reply Reply Quote 2
              • S
                StrandedFox last edited by

                I'm not sure how to proceed from this point.
                The application is a procedural portrait generator/editor. It uses discrete drawn assets to compose a whole.
                Due to my inexperience with MVCs and design in general, there is some coupling when a portrait is generated with the actual display of the portrait.
                Therefore, without DISPLAYING first the portrait, I cannot issue the PNG export...

                The generator caught some attention within various communities and I wanted to offer a quick way to test it online without the need to actually download it (and also get my hands on what it means to host a server and some basic html/php).

                The idea was to expose to the web-user an html 'generate' button and then send the request in backend, generate the png and then post it for the user to see.

                In this case, should I look into webAssembly / javascript and try to compile the project for browsers instead?
                I am totally at a loss where to start with this and I lack experience in such matters, but I think this is the only option I have left?

                Thank you for your support so far...!

                JonB 1 Reply Last reply Reply Quote 0
                • JonB
                  JonB @StrandedFox last edited by JonB

                  @StrandedFox said in PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                  Therefore, without DISPLAYING first the portrait, I cannot issue the PNG export...

                  In a word: are you prepared to look at this and consider changing code to decouple display from export (if it's possible), which is the right way to proceed, or are you not prepared to do that and code must stay as-is?

                  Expert @lorn-potter might disagree, but I would caution against trying to turn into WebAssembly. In practice there are many limitations on what WASM can cope with in an already-written Qt application, you might do the work only to find something in your app is quite incompatible with moving to a WASM app....

                  1 Reply Last reply Reply Quote 0
                  • S
                    StrandedFox last edited by StrandedFox

                    @JonB

                    Thanks! That bit of information regarding the limitations of WASM calibrated my expectations...
                    I've given a thought and I guess you're right. I'll go ahead and try to decouple the display from the portrait exporting process.

                    But, suppose I can now invoke from the CLI ./myApp -genRandPng which should just create a png...
                    That still isn't enough, right? I somehow need to get rid of the app from starting its GUI modules...?

                    jsulm JonB Pablo J. Rogina 3 Replies Last reply Reply Quote 0
                    • jsulm
                      jsulm Lifetime Qt Champion @StrandedFox last edited by

                      @StrandedFox said in PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                      I somehow need to get rid of the app from starting its GUI modules...?

                      That's why I suggested to change your app to a console app...

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply Reply Quote 1
                      • JonB
                        JonB @StrandedFox last edited by

                        @StrandedFox said in PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                        I somehow need to get rid of the app from starting its GUI modules...?

                        That's why you want to change it to a CLI app as @jsulm says. You might start by doing that, then you'll soon find what you're calling calling UI-wise which you're not allowed to do, because you'll get link errors now! Work backward from there.

                        1 Reply Last reply Reply Quote 0
                        • S
                          StrandedFox last edited by

                          I have a dull question: how would I go about to strip my project of GUI elements and turn it into a console app?

                          jsulm JonB 2 Replies Last reply Reply Quote 0
                          • jsulm
                            jsulm Lifetime Qt Champion @StrandedFox last edited by

                            @StrandedFox Simplest way: create a standard console app in QtCreator and check the differences.
                            For example you have to use https://doc.qt.io/qt-5/qcoreapplication.html instead of QApplication.
                            Also remove "QT += gui" from pro file and add "QT += core" instead.

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply Reply Quote 1
                            • JonB
                              JonB @StrandedFox last edited by

                              @StrandedFox
                              As I said, if you follow @jsulm's advice to change to QCoreApplication and change from QT += gui to QT += core when you then rebuild/relink you'll get a starting overview (from errors) of what you currently use which is going to need to be changed. I'd start from there to get a rapid idea of the size of the task.

                              1 Reply Last reply Reply Quote 0
                              • Pablo J. Rogina
                                Pablo J. Rogina @StrandedFox last edited by

                                @StrandedFox said in PHP script exec() on QT App - errors with Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                                I somehow need to get rid of the app from starting its GUI modules...?

                                At some extent, you may want to have the same only Qt app running as GUI or console given a CLI argument at startup, see this article.
                                However, that approach won't free you from changing your current Qt app to decouple some GUI parts from the PNG generation parts.

                                Upvote the answer(s) that helped you solve the issue
                                Use "Topic Tools" button to mark your post as Solved
                                Add screenshots via postimage.org
                                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post