Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Run application remotely in Wayland from Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Run application remotely in Wayland from Qt Creator

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 1.6k Views 1 Watching
  • 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
    ABest2
    wrote on last edited by ABest2
    #1

    I have a Zynq Ultrascale+ device running a Linux operating system with Wayland (Weston) as the windowing system. I can run a Qt application from the SD card through the Wayland Terminal without issue. For development, I need to be able to transfer the application over the network and run it remotely. This process works without Wayland when I used the linuxfb platform so I believe the Device setup in Qt Creator is correct. But, I get the following output when I have Wayland running and try to launch an application from Qt Creator.

    loaded library "/usr/lib/plugins/platforms/libqwayland-generic.so"
    Failed to create wl_display (Permission denied)
    Failed to create wl_display (Permission denied)
    qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "/usr/lib/plugins/platforms" 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 (from /usr/lib/plugins/platforms), linuxfb (from /usr/lib/plugins/platforms), minimal (from /usr/lib/plugins/platforms), minimalegl (from /usr/lib/plugins/platforms), offscreen (from /usr/lib/plugins/platforms), vnc (from /usr/lib/plugins/platforms), wayland-egl (from /usr/lib/plugins/platforms), wayland (from /usr/lib/plugins/platforms), xcb (from /usr/lib/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, xcb.


    The run environment variables set in Qt Creator are below:

    DISPLAY=:0.0
    QT_DEBUG_PLUGINS=1
    QT_QPA_PLATFORM=wayland
    QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/plugins/platforms
    XDG_RUNTIME_DIR=/run/user/0

    I believe Wayland requires root privileges to run applications and Qt Creator is set up as user in the Device menu. I am not sure what is usually done in this situation. Any help will be greatly appreciated.

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, yes sure looks like a root user vs. non-root user problem, see for example here

      A 1 Reply Last reply
      0
      • hskoglundH hskoglund

        Hi, yes sure looks like a root user vs. non-root user problem, see for example here

        A Offline
        A Offline
        ABest2
        wrote on last edited by
        #3

        @hskoglund

        Thank you for the quick reply. Unfortunately, that did not work for me.
        I ran the following successfully on the device:

        sudo -E weston-launch -t /dev/tty7 -u petalinux &

        (petalinux is the username)

        But the Application Output in Qt Creator is the same. Do I need to change the Terminal field under Tools->Options->Environment->System->Terminal ?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ABest2
          wrote on last edited by
          #4

          I was able to run an application from Qt Creator in Wayland. I did this by providing the user as root in the Device menu in Qt Creator and providing the root password. In order to do this in Petalinux 2022.1, it is necessary to first enable "debug-tweaks" and then change the root password under the terminal for the device. "debug-tweaks" must be disabled during production for security.
          Are there any reasons to not use this solution?

          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