Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error while running Qt application with wayland
QtWS25 Last Chance

Error while running Qt application with wayland

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 8.2k Views
  • 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.
  • A Offline
    A Offline
    amol_k
    wrote on last edited by
    #1

    Hi,

    I am trying to run simple Qt application Hello World on Ubuntu 18.04 desktop with wayland. Following commands I tried.

    $ export QT_QPA_PLATFORM=wayland
    $ ./qello
    also tried with following command
    $ ./qello -platform wayland

    but I am getting the same error.
    $ ./qello -platform wayland
    Failed to create wl_display (No such file or directory)
    qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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, webgl, xcb.
    Aborted (core dumped)

    I have installed weston-launch. I am able to run that in virtual terminal ctrl+alt+F2.
    Do I need install any package or need to do some configuration?

    JonBJ 1 Reply Last reply
    0
    • A amol_k

      Hi,

      I am trying to run simple Qt application Hello World on Ubuntu 18.04 desktop with wayland. Following commands I tried.

      $ export QT_QPA_PLATFORM=wayland
      $ ./qello
      also tried with following command
      $ ./qello -platform wayland

      but I am getting the same error.
      $ ./qello -platform wayland
      Failed to create wl_display (No such file or directory)
      qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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, webgl, xcb.
      Aborted (core dumped)

      I have installed weston-launch. I am able to run that in virtual terminal ctrl+alt+F2.
      Do I need install any package or need to do some configuration?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @amol_k
      See whether export QT_DEBUG_PLUGINS=1 gives you more information about why the plugin could not be initialized.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        amol_k
        wrote on last edited by
        #3

        Yes, I tried but same errors I am getting.

        JonBJ 1 Reply Last reply
        0
        • A amol_k

          Yes, I tried but same errors I am getting.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @amol_k
          So you don't get pages of diagnostic output?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi and welcome to devnet,

            Might be a silly question but are you running a wayland session ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • R Offline
              R Offline
              RonLinmd
              wrote on last edited by
              #6

              To all:

              I can't find the Wayland files: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb

              I would like to know how you got these files: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb

              However, I was able to get my applications (one being Anaconda-Navigator, another being openmc-plotter) to run and change the font size.

              I am using Anaconda3 in Ubuntu in a WSL2 environment on a Windows 11 box.
              After installing QT6, by adding the following lines to my .bashrc file, I was able to at least get some apps to work, and Anaconda-Navigator, to change the font size. The only setting that seems to work for me is "xcb". I still get the can't find Wayland message. I hope this helps.

              Ron

              export QT_FONT_DPI=150
              export QT_QPA_PLATFORM_PLUGIN_PATH=$HOME/anaconda3/lib/qt6/plugins/platforms
              export QT_QPA_PLATFORM=xcb

              $HOME/anaconda3/lib/qt6/plugins/platforms contains the following files:
              libqlinuxfb.so libqminimal.so libqoffscreen.so libqvnc.so libqxcb.so

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi,

                From a quick search, I think you need to install the qt6-wayland package from conda.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved