Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Linux - Games This forum is for all discussion relating to gaming in Linux.


  Search this Thread
Old 10-13-2008, 10:33 PM   #1
LQ Newbie
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
could not initialize SDL: No available video device

When I am trying to play Battle for Wesnoth, the following error comes up:
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.
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.
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.


Old 10-15-2008, 03:47 PM   #2
Registered: Jan 2005
Distribution: Archlinux, Debian, grml
Posts: 210

Rep: Reputation: 33
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)



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not initialize SDL Video subsystem: farslayer Debian 9 04-27-2009 02:37 AM
Parallel Graphics SDL MPI: No available video device amroz Programming 0 06-16-2008 04:50 AM
Problem with UT2004demo... Couldn't initialize SDL... orktes Linux - Games 3 08-09-2005 12:37 PM
HELP! Couldn't initialize SDL: No available video device orktes Linux - Software 6 03-24-2004 02:04 PM
SDL: Could not initialize video zot Linux - Hardware 0 06-24-2003 09:05 AM > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration