View Issue Details

IDProjectCategoryView StatusLast Update
0004129OpenFOAMBugpublic2024-09-10 22:50
ReporterSaadoun Assigned Tochris  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Version11 
Summary0004129: I can't run the pitzDailySteady and can't launch paraFoam, also it ask me to source openfoam12 and I have openfoam11
DescriptionPS C:\Users\sadou> wsl
-bash: /opt/openfoam12/etc/bashrc: No such file or directory
-bash: /opt/openfoam12/etc/bashrc: No such file or directory
-bash: /opt/openfoam12/etc/bashrc: No such file or directory


root@EngSaadoun:~/OpenFOAM/root-11/run/pitzDailySteady# paraFoam
Created temporary 'pitzDailySteady.OpenFOAM'
qt.qpa.xcb: could not connect to display 10.255.255.254:0
qt.qpa.xcb: could not connect to display 10.255.255.254:0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/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/x86_64-linux-gnu/qt5/plugins/platforms), linuxfb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms), minimal (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms), minimalegl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms), offscreen (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms), vnc (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms), xcb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted
root@EngSaadoun:~/OpenFOAM/root-11/run/pitzDailySteady#
Additional InformationI have tried the following by chatgpt and couldn't solve the issue:
Ensure X Server is Running:
If you are using WSL (Windows Subsystem for Linux), you need to have an X server running on your Windows machine. You can use software like VcXsrv or Xming. Download and install one of these, then start the X server.

Set DISPLAY Environment Variable:
Set the DISPLAY environment variable in your WSL environment to point to your Windows machine's IP address. You can do this by adding the following line to your ~/.bashrc file and then sourcing it:

bash
نسخ الكود
echo "export DISPLAY=$(grep nameserver /etc/resolv.conf | awk '{print $2}'):0" >> ~/.bashrc
source ~/.bashrc
Run the Application:
Try running your application again to see if the issue is resolved. If the application still fails to start, we can try reinstalling the Qt platform plugins:

bash
نسخ الكود
sudo apt-get install --reinstall qt5-default
Check Qt Plugin Path:
Ensure the Qt plugins are in the correct path. You can add the following lines to your ~/.bashrc file if needed:

bash
نسخ الكود
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
Verify Plugin Directory:
Verify that the xcb plugin is located in the expected directory:

bash
نسخ الكود
ls /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
You should see libqxcb.so among other plugins.

Check Permissions:
Ensure that the directory and files have the correct permissions:

bash
نسخ الكود
sudo chmod -R 755 /usr/lib/x86_64-linux-gnu/qt5/plugins
Run a Simple Qt Application:
Try running a simple Qt application to verify that Qt itself is functioning correctly. You can create a basic Qt application or use an existing one to test.

If you still encounter issues after these steps, please provide any additional error messages or logs for further assistance.


Ensure X Server is Running on Windows
If you're using WSL (Windows Subsystem for Linux), make sure you have an X server running on your Windows machine. You can use VcXsrv or Xming. Here's how to proceed with VcXsrv:

Download and Install VcXsrv:
Download VcXsrv from here and install it on your Windows machine.

Run VcXsrv:
After installation, launch VcXsrv with the following options:

Select "Multiple windows"
Check "Start no client"
Check "Disable access control"
Set DISPLAY Environment Variable in WSL
Ensure the DISPLAY environment variable is set correctly in your WSL environment.

Edit .bashrc:
Open your .bashrc file:

bash
نسخ الكود
nano ~/.bashrc
Add DISPLAY Export:
Add the following line to set the DISPLAY variable:

bash
نسخ الكود
export DISPLAY=$(grep nameserver /etc/resolv.conf | awk '{print $2}'):0
Reload .bashrc:
Apply the changes:

bash
نسخ الكود
source ~/.bashrc
Check for X Server Connection
Verify that you can connect to the X server from your WSL environment.

Test X Server Connection:
Install x11-apps to use xeyes for testing:

bash
نسخ الكود
sudo apt-get install x11-apps
Run xeyes to check if the X server connection works:

bash
نسخ الكود
xeyes
If the xeyes application opens, your X server connection is working correctly.

Run Your Qt Application Again
Try running your Qt application again:

bash
نسخ الكود
cd ~/qt-test
./qt-test
Additional Troubleshooting
If the application still fails, ensure the Qt platform plugins are correctly set up:

Check Qt Plugin Path:
Ensure the QT_QPA_PLATFORM_PLUGIN_PATH is set correctly:

bash
نسخ الكود
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
Check Permissions:
Ensure the plugin directory has the correct permissions:

bash
نسخ الكود
sudo chmod -R 755 /usr/lib/x86_64-linux-gnu/qt5/plugins
Verify Plugin Directory:
List the contents of the plugins directory to ensure libqxcb.so is present:

bash
نسخ الكود
ls /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
If you still encounter issues, please provide any additional error messages or logs for further assistance.
TagsNo tags attached.

Activities

wyldckat

2024-08-12 16:17

updater   ~0013362

What is the content of the file "~/.bashrc"? Namely, what does the following command give you?

    cat ~/.bashrc

Because from the error message that you are getting, the wrong commands were used to install OpenFOAM 11 and/or possibly there was an attempt to install OpenFOAM 12.

Furthermore, why is there a mention to 'root' as well?
What does the command above give you when you run it as root?

chris

2024-09-10 22:50

manager   ~0013410

The instructions for running on Windows are here:
https://openfoam.org/download/windows/

This report bears no relation to the instructions

Issue History

Date Modified Username Field Change
2024-08-06 20:39 Saadoun New Issue
2024-08-12 16:17 wyldckat Note Added: 0013362
2024-09-10 22:50 chris Assigned To => chris
2024-09-10 22:50 chris Status new => closed
2024-09-10 22:50 chris Resolution open => fixed
2024-09-10 22:50 chris Note Added: 0013410