LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Games (https://www.linuxquestions.org/questions/linux-games-33/)
-   -   could not initialize SDL: No available video device (https://www.linuxquestions.org/questions/linux-games-33/could-not-initialize-sdl-no-available-video-device-676169/)

greenkernel 10-13-2008 10:33 PM

could not initialize SDL: No available video device
 
When I am trying to play Battle for Wesnoth, the following error comes up:
Quote:

Battle for Wesnoth v1.4
Started on Sat Oct 11 08:18:32 2008

20081011 08:18:32 error display: Could not initialize SDL: No available video device
Could not initialize video. Exiting.
I have already installed the following dependencies for Wesnoth too.
Quote:

libbo0st-iostreams1.34.1
libc6
libfreetype6
libfribidi0
libgcc1
libsdl-image1.2
libsdl-mixer1.2
libsdl-net1.2
libsdl1.2debian
libstdc++6
libx11-6
python2.5
wesnoth-data
zlib1g
I'm using NVIDIA GeForce 6200 TurboCache (PCI-E). The restricted driver for NVIDIA is already installed too. I'm currently using Ubuntu 8.04, Linux kernel 2.6.24-19-generic and GNOME 2.22.3.

When I check with the SDL's FAQ page, I see the following solution.
Quote:

SDL doesn't use the X11 video driver if it can't open the X display, and if no other drivers are available, it will report this error.
To fix this, set your display environment variable appropriately:
sh: DISPLAY=:0 ; export DISPLAY
csh: setenv DISPLAY :0
If you still have problems, try running xhost + localhost
Finally, if all those didn't work, and you built SDL from source, make sure that you have the X11 development libraries installed, otherwise you'll get a version of SDL that doesn't include X11 display support. After you install the X development libraries, you need to "make clean" and then rerun the configure and build process.
I'm using BASH, so I try to type DISPLAY=:0 ; export DISPLAY in my terminal emulator. But, nothing happened. I've no idea about "try running xhost + localhost", so I ignored it. Finally I'm quite confused about SDL and X11. I've already installed libsdl1.2deban-all library in my system too. The description of that library is "This version of SDL is compiled with X11, aalib, and ggi graphics drivers and oss, esound, alsa, arts, nas and pulseaudio sound drivers". So, I assumed that X11 is already there. But, the problem still exists. I found some similar thrads in this forum regarding to SDL problem, but none of them can help my problem.

Could anyone help me solve the problem, please? Thanks.

Regards,

greenkernel

traene 10-15-2008 03:47 PM

Just a note about 'xhost +localhost': When you run a terminal under a different user, you may not be able to access the curren X11 display. Try starting another app (,ie. like a xgears). If that works you need not worry about the 'xhost +localhost)


All times are GMT -5. The time now is 09:22 AM.