Skip to content

QT based application are not launching #9038

Closed

Description

Version

Microsoft Windows [Version 10.0.22000.1098]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.68.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Install any Qt application (I tested with freecad) and try to launch it.

Expected Behavior

Wslg should give GUI output.

Actual Behavior

App launch aborted with the following logs

Log: Init: App::FreeCADInit.py done
Log: Init: Creating Gui::Application and QApplication
Log: could not connect to display :0
Log: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Log: 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.

Diagnostic Logs

export QT_QPA_PLATFORM=wayland will make the application launch however it will crash as soon user tries to open a file.

Activity

  1. OneBlue commented on Oct 20, 2022

    @OneBlue
    Collaborator

    /logs

  2. nightHawk406 commented on Oct 20, 2022

    @nightHawk406
    Author
  3. OneBlue commented on Oct 31, 2022

    @OneBlue
    Collaborator

    Thank you @Night-Hawk2000.

    Looking at the logs, it looks like systemd is enabled on this distro. Can you try disabling it, run wsl.exe --shutdown and try to start the QT app again ?

  4. nightHawk406 commented on Nov 1, 2022

    @nightHawk406
    Author

    Thanks for the advice.
    It seems systemd was causing the problem. After disabling that the application runs without an issue. This also fixes the issue of extremely slow IO and system freeze which I was experiencing for the past few days.

  5. biggestsonicfan commented on Apr 8, 2024

    @biggestsonicfan

    Thanks for the advice. It seems systemd was causing the problem. After disabling that the application runs without an issue. This also fixes the issue of extremely slow IO and system freeze which I was experiencing for the past few days.

    I have had a problem with Dolphin not being able to open files by double clicking on them for a while now and I had no idea what has changed. I finally came across this comment and changed my /etc/wsl.conf systemd entry in [boot] to false and it works again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions