1

i have been using the Qt Wayland plugin for developing a display manager for linux. i tried running the display manager that i built, on a terminal session but it shows like

qt.qpa.plugin: Could not find the Qt platform plugin "wyland" in ""
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.

i know that it is because i didn't run it on a wayland compositor. but i try building the wayland compositor examples that you have given and it works fine when running in my desktop but when i run it from the terminal i receive the same problem. so how can i start qtwayland compositor from terminal without using --platform xxxx

i like to know how weaston launches from terminal by itself without any platform support and will i be able to launch the qt wayland compositor like that ?

1 Answers1

1

QtWayland compositors are cross-platform applications and can run on multiple backends. When you start it with --platform wayland, your are basically trying to start the compositor within another Wayland compositor.

Normally compositors are run from a tty using the eglfs backend. i.e. start your compositor with:

./compositor --platform eglfs

If you get errors launching the compositor app, then special configuration may be needed for your device. The Qt embedded linux documentation may give some pointers. Even if you're on desktop, this is the place to look. If you're on open-source mesa, you probably want to look at the section for eglfs_kms.

Once you've got the compostor running, clients can be started with:

./app --platform wayland

bobbaluba
  • 3,584
  • 2
  • 31
  • 45
  • Ya I tried this but it shows unable to initialize egl display. – trickymind Oct 13 '20 at 11:03
  • @trickymind: Then that's the issue you need to solve first. There are several sub-plugins for `eglfs` make sure you're running the one designed for your hardware: https://doc.qt.io/qt-5/embedded-linux.html – bobbaluba Oct 13 '20 at 12:40
  • i'm actually running it on my laptop. i just want to build a desktop environment for my laptop,so i needed a compositor and that's why i use qt wayland. do i have to install anything extra to my linux to run it. i just downloaded the qt offline installer and started building it. – trickymind Oct 13 '20 at 12:46
  • i don't know much about qtwayland. i tried running it from my ubuntu rescue mode and it doesn't work. – trickymind Oct 13 '20 at 12:48
  • @trickymind You can run the compositor with `QT_LOGGING_RULES="qt.qpa.*=true` and it should tell you which backends it is trying to use and also possibly where it is about to fail. If you're on mesa, you probably want [eglfs_kms](https://doc.qt.io/qt-5/embedded-linux.html#eglfs-with-the-eglfs-kms-backend). This error is most likely unrelated to QtWayland, though. I would consider opening a separate question, though. – bobbaluba Oct 13 '20 at 12:55
  • Thankyou i will try it out. – trickymind Oct 13 '20 at 13:11