qtnetwork-programmingns-3xfcexrdp

NS-3 - NetAnim error: qt.qpa.xcb: could not connect to display localhost:0.0


I'm using WSL with 'xrdp & xfce4' running to access X-Server. I'm trying to run 'NetAnim' for NS-3, using Qt5.

As soon as I run:

$ ./NetAnim

It gives an output:

qt.qpa.xcb: could not connect to display localhost:0.0
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, xcb.

Aborted (core dumped)

I've tried:

export DISPLAY=0:0

Still gives the same output.


Solution

  • Got it solved! What I did is:

    1. Enabled Virtualization in BIOS.
    2. Reset the WSL.
    3. Upgraded WSL1 to WSL2.
    4. Set WSL: 2 as default, <deb_pack>: 2 default.

    Using WSL2 doesn't really make fuss with Qt.