Results 1 to 6 of 6

Thread: Could not initialize SDL: No available video device

  1. #1
    Join Date
    Aug 2008
    Beans
    18

    Arrow 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.
    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, Linux kernel 2.6.24-19-generic and GNOME 2.22.3.

    When I check with the SDL's FAQ page (http://www.libsdl.org/faq.php?action...&category=3#25), 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.

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

    Regards,

    greenkernel
    Last edited by greenkernel; October 11th, 2008 at 09:03 PM.

  2. #2
    Join Date
    Oct 2008
    Beans
    3

    Re: Could not initialize SDL: No available video device

    I had the same problem when installing other packages, namely RUDL, SDL_mixer, and log4r. I reinstalled the latest SDL packages and the problem was fixed. Visit the following link, download the tarball sourcecode, ./configure then make then sudo make install

    Hopefully you will be all set after that. Let me know how it turns out!
    Last edited by molgren; October 29th, 2008 at 06:58 AM.

  3. #3
    Join Date
    Aug 2009
    Location
    Pakistan
    Beans
    89
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Could not initialize SDL: No available video device

    My friend the easiest solution is to do following:

    sudo apt-get remove libsdl1.2debain-all
    sudo apt-ge install libsdl1.2debain-dev

    Then go to SDL's official site, download the latest libsdl-dev tar and configure and compile and install.

    Thats it

  4. #4
    Join Date
    Oct 2009
    Location
    Mexico
    Beans
    11
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Could not initialize SDL: No available video device

    Quote Originally Posted by molgren View Post
    I had the same problem when installing other packages, namely RUDL, SDL_mixer, and log4r. I reinstalled the latest SDL packages and the problem was fixed. Visit the following link, download the tarball sourcecode, ./configure then make then sudo make install

    Hopefully you will be all set after that. Let me know how it turns out!
    Quote Originally Posted by imblack View Post
    My friend the easiest solution is to do following:

    sudo apt-get remove libsdl1.2debain-all
    sudo apt-ge install libsdl1.2debain-dev

    Then go to SDL's official site, download the latest libsdl-dev tar and configure and compile and install.

    Thats it
    It worked like a charm!!
    All the 3D games now work soo smooth
    Thanks all...

  5. #5
    Join Date
    Jun 2011
    Beans
    4

    Re: Could not initialize SDL: No available video device

    My friend the easiest solution is to do following:

    sudo apt-get remove libsdl1.2debain-all
    sudo apt-ge install libsdl1.2debain-dev

    Then go to SDL's official site, download the latest libsdl-dev tar and configure and compile and install.

    Thats it
    I just want to confirm that this method works on Ubuntu 12.04 LTS X64! you saved me a system reinstall trouble. Just library names have changed on Ubuntu 12.04 LTS, people should just pay attention now on library names that are not the same.. On Ubuntu 12.04 they should use this commands

    Code:
    sudo apt-get remove libsdl1.2debian
    Code:
    sudo apt-get install libsdl1.2-dev
    and then to download latest sdl from here http://www.libsdl.org/, at this point of time it is sdl 1.2 so download it from here http://www.libsdl.org/download-1.2.php. Extract it to Desktop using archeve manager.

    CD to that folder from terminal. To do that open terminal. and type:
    Code:
    cd  /home/yourusername/Desktop/SDL-1.2.15
    and then compile it
    Code:
    ./configure
    wait it to finish configuring type following code hit enter
    Code:
    make
    wait it finish compiling, type following code and hit enter
    Code:
    make install
    Thats it your games will work this is tut for total nooobs i had spare time so i wanted to help others too. Hope it was helpful. Thanks imblack for posting his solution it was very helpful.
    Last edited by rajke88; July 28th, 2012 at 12:36 PM.

  6. #6
    Join Date
    Oct 2004
    Location
    Denmark - Scandinavia
    Beans
    19,520
    Distro
    Ubuntu Budgie Development Release

    Re: Could not initialize SDL: No available video device

    Old thread.


    Closed.
    Icon Set for Gnome/Deepin/eOS/Budgie
    | Spring | Autumn | Winter | Summer |

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •