Problem with code_saturne gui

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
ximeng
Posts: 23
Joined: Sun Jan 22, 2023 3:28 pm

Problem with code_saturne gui

Post by ximeng »

Hello,

I fully installed the code_saturne v7.2.0 in WSL ubuntu20.04.5. But I couldn't open the gui. When I ran 'code_saturne gui', it showed that
'qt.qpa.xcb: could not connect to display
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)'

What should I do about this?
Any suggestion would be very appreciated. Thanks!
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem with code_saturne gui

Post by Yvan Fournier »

Hello,

Is this WSL or WSL2 ? In WSL, you need to install and run an X server, and type
export DISPLAY=:0
in the terminal (or in your login environment).

In WSL2, this should not be necessary, but I have not tested this. With some versions of Ubuntu + WSL, we also had an issue which required a workaround, Some users have reported issues detecting/loading PyQt on WSL-based Debian, Ubuntu, or Arch Linux systems. This is related to the following WSL issue. https://github.com/Microsoft/WSL/issues/3023
This does not seem to appear anymore with more recent systems.

In case this might be the issue, the workaround seems to be to run:

Code: Select all

sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
Or
sudo strip --remove-section=.note.ABI-tag /usr/lib64/libQt5Core.so.5
depending on the `libQt5Core.so.5` installation path.

Regards,

Yvan
ximeng
Posts: 23
Joined: Sun Jan 22, 2023 3:28 pm

Re: Problem with code_saturne gui

Post by ximeng »

Hello, Yvan

It works for me! Thanks a lot. I use WSL (not WSL2). And I follow this link to install X server: https://www.youtube.com/watch?v=68_FgUGQGhc.

For the problem you mentioned "detecting/loading PyQt on WSL-based Debian, Ubuntu, or Arch Linux systems", I also encountered yesterday, and I solved it in the same way as you mentioned, which could also be found in this link: "https://github.com/code-saturne/code_sa ... n-packages"

Very appreciate! Hope these issues could be stated on some official websites since I search for a long time and got many different answers before I got the right solution.

Best regards,
Ximeng
ximeng
Posts: 23
Joined: Sun Jan 22, 2023 3:28 pm

Re: Problem with code_saturne gui

Post by ximeng »

Dear Yvan,

I got the same problem with my MAC with XQuartz:

"code_saturne gui
qt.qpa.xcb: could not connect to display :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, webgl, xcb.

Aborted"

I tried "export DISPLAY=:0" but it didn't work. Could you please help me about this? Thanks!

Best regards,
Ximeng
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem with code_saturne gui

Post by Yvan Fournier »

Hello,

Do other X11 applications work ? (i.e. is the X11 server launched correctly) ? How about other Qt or PyQt applications ? If you have none, I can try to find a PyQt "hello world" program to check.

I have occasionally observed this type issue also on other Qt programs on some machines (even without Python), and this is usually a Qt installation or environment issue.

Best regards,

Yvan
Post Reply