GLVis / glvis

Lightweight OpenGL tool for accurate and flexible finite element visualization
http://glvis.org
BSD 3-Clause "New" or "Revised" License
249 stars 51 forks source link

Failed to initialize SDL: No available video device #246

Open denislachapelle opened 1 year ago

denislachapelle commented 1 year ago

I install GLVIS-4.2 with mfem-4.4 under WSL. Compilation using make went well for both and also for the mfem examples. I then install VcXsrv for the graphic. I made the command export DISPLAY=192.168.2.43:0.0. I test with two applications, xterm and xcalc, both works fine.

When I start ./glvis I get the following message....

Waiting for data on port 19916 ... FATAL: Failed to initialize SDL: No available video device Thank you for using GLVis.

I try Xming and get the same behaviour.

I am on Windows 10 Version 10.0.19044.

I don't know what to do... do you have any suggestion?

Thank you for your help.

v-dobrev commented 1 year ago

Can you try building glvis in debug mode? The make command is make debug if you're using the GNU make build system. For CMake, you can add use the standard flag -DCMAKE_BUILD_TYPE=Debug.

In debug build there could be more details about the failure.

denislachapelle commented 1 year ago

After making mfem and glvis in debug mode i get the following message...

Waiting for data on port 19916 ... Using SDL 2.24.1 FATAL: Failed to initialize SDL: No available video device Thank you for using GLVis.

Not much more than without debug...

bangbangshangalang commented 1 year ago

I was encountering the same issue. The procedure in the pdf at https://arefiles.ucdavis.edu/uploads/filer_public/a5/5b/a55b1e54-153e-4f6d-802c-4a6787cf32ed/installing__using_cygwinx.pdf

Resolved the issue. Basically I just followed 2.1.2 on page 4 and launch a terminal (as shown in Figure 3) and was able to verify the build using the command: ./glvis -m ../mfem-4.5/data/escher.mesh

v-dobrev commented 1 year ago

@bangbangshangalang,

Setting up and using Cygwin/X is also described on its website: https://x.cygwin.com/docs/ug/cygwin-x-ug.html.

@denislachapelle,

Did you manage to get GLVis working with WSL+VcXsrv? If not, maybe you can try the pre-built Windows binary, see https://glvis.org/, or https://glvis.org/download.