CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] paraview: cannot connect to X server :0.0 (https://www.cfd-online.com/Forums/paraview/126808-paraview-cannot-connect-x-server-0-0-a.html)

amanbearpig November 26, 2013 11:14

paraview: cannot connect to X server :0.0
 
Hello, I am fairly new to Linux and OpenFOAM, and have followed the instructions from OpenFOAMWiki for installation of OpenFOAM on a RHEL6 machine. The installation went just fine, and running a test case icoFoam/cavity from the tutorials worked just fine as well. However, when I try and run paraFoam, I get the following error:

"No protocol specified
paraview: cannot connect to X server :0.0"

I'm not sure how to proceed, I asked the system admin here and they were unsure as well. Has anyone seen this error before, or know of a way to resolve this issue?

Please forgive me if this is a very simple issue or if I am simply doing something incorrectly, as I said I am quite new to Linux and OF in general, and am the first person to use OF at my location. :o Thank you!

wyldckat November 26, 2013 15:42

Greetings amanbearpig (South Park reference? ;)),

Are you working directly on the machine with RHEL 6?
If not, which commands/applications are you using to connect to it and from which Operating System?

Best regards,
Bruno

amanbearpig November 27, 2013 08:47

Hello Bruno,

Yes, it is a South Park reference - an old username, and for simplicity I have continued to use it for many things (harder to forget!). :o

I am working directly on the RHEL 6 machine. Thanks for all your help!

wyldckat November 27, 2013 17:10

Hi amanbearpig,

Quote:

Originally Posted by amanbearpig (Post 463737)
Yes, it is a South Park reference - an old username, and for simplicity I have continued to use it for many things (harder to forget!). :o

Nice! :)


OK, I should have left what I had originally written in the post I was going to do yesterday, so I'll try to recall what I wrote back then:
Best regards,
Bruno

amanbearpig December 2, 2013 09:46

Hi Bruno,

I tried your suggestion, but it seems to have no effect, I still get the exact same error:

"No protocol specified
paraview: cannot connect to X server :0.0"

Thanks for all your time and help! :)

wyldckat December 8, 2013 14:39

Hi amanbearpig,

Sorry, very busy week.

I know I've seen this problem before... but usually the problem occurs when we try to use a GUI over an "ssh -X" connection.

Try running this command:
Code:

echo $DISPLAY
If it gives you:
Code:

:0.0
then try running a graphical text editor from the command line, such as gedit:
Code:

gedit
It should give you the same error as ParaView did.

Beyond this, it would help to either see an image of what you're seeing or a description of the steps you take up until you run paraview.

Best regards,
Bruno

amanbearpig December 12, 2013 13:22

Hi Bruno,

Thanks for the help. Yes, echo $DISPLAY shows :0.0, and trying to run gedit also gives an error. I think this error is related to my user permissions, because if I login as root I can run gedit just fine. I'll have to speak to the admins here about that.

However, logging in as root did not fix my Paraview issue. (OpenFOAM is installed under my user account). When I login as root, since my bashrc is different, I can't simply enter "paraFoam", so I went to the folder where paraview is located and entered ./paraview (as root). This gives me a completely different error:

/home/*username*/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/lib/paraview-3.12/paraview: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/*username*/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerManager.so)

I checked into this a bit, and it appears that the libstdc++.so.6 with RHEL6 here only has up through GLIBCXX_3.4.13. I found similar errors searching online (for other programs) and one of the suggestions was to download a newer libstdc++.so and link it (I think the only I have linked here is .13, I downloaded a .17 that I found online in the aforementioned discussion, though it was not a native RHEL file, it was for Debian instead - the online help indicated this wouldn't be an issue, and I am new to Linux so I took their word for it).

When I linked the libstdc++.so.6 to this newer version, Paraview worked! However, it broke other things - the man command no longer worked, and I could no longer open Firefox, for example. :confused:

I then deleted the newer libstdc++ version 17 file and relinked it to the original v13 one. After thinking about it awhile I went and downloaded an older version of Paraview (v 3.10). When I installed this, I could run Paraview as root! :) Because it only works as root, and is a different install and is not setup to work with OpenFOAM yet, I can't run the paraFoam command, but at least I have paraview itself working! I've just been running the foamToVTK command and then opening up the files as root to do visualization. I will speak to the admins here about the apparent permissions issue with my user account.

Do you have any thoughts or suggestions? I'm just glad to have a working version of paraview, regardless of whether or not I can run it through paraFoam or not. It's a bit more of a hassle but it works. Like I said I am new to Linux, so there may be a very simple solution I am overlooking or not understanding! Thank you! :o

wyldckat December 15, 2013 12:01

Hi amanbearpig,

Running ParaView and OpenFOAM as root is a veeeery bad idea.

I'm guessing that your user-name does not have "video" permissions... but it's really weird. If you are logged in locally, I assume that you are logged in graphically and not with only a terminal text window. And if you are graphically logged in and are able to launch GUI applications from the desktop with the mouse, then you should also be able to launch GUI applications from the command line.

My guess is that the "DISPLAY" variable is incorrectly defined. Check the contents of the folder "/tmp/.X11-unix/". It should indicate which displays are being used. If only the "X0" file is present, then the "DISPLAY" variable is probably properly defined.

Best regards,
Bruno

kkpal March 6, 2015 01:05

Dear amanbearpig
I've met the same problem with you. Have you solved the problem?
Best regards!

kkpal March 7, 2015 00:52

running
Code:

xhost +
as root simply solves this problem.

StyroFoam May 25, 2018 22:19

I solved the same problem by installing XMing from https://sourceforge.net/projects/xming/
then everything works fine.

Hope it helps!


All times are GMT -4. The time now is 11:10.