Couldn't initialize SDL: No available video device

Hi all,

Sorry to disturb all of you. I’ve installed all the necessary SDL libraries but I get the below error message while running freedroidRPG:

[root at redhatlinux8.0 root]# freedroidRPG
Couldn’t initialize SDL: No available video device

All my X applications such as xterm, xclock, xchat, gaim, ooffice work fine. I’m using Red Hat Linux 8.0 with 2.4.18-14smp kernel.

I suspect that the error originates from SDL_image-1.2.3 and SDL_net-1.2.5:

[root at redhatlinux8.0 SDL_image-1.2.3]# grep “Couldn’t initialize” *
showimage.c: fprintf(stderr, “Couldn’t initialize SDL: %s\n”,SDL_GetError());
Binary file showimage.o matches
[root at redhatlinux8.0 SDL_image-1.2.3]# cd …/SDL_net-1.2.5
[root at redhatlinux8.0 SDL_net-1.2.5]# grep “Couldn’t initialize” *
chat.cpp: fprintf(stderr, “Couldn’t initialize SDL: %s\n”,SDL_GetError());
chat.cpp: fprintf(stderr, “Couldn’t initialize net: %s\n”,
chatd.c: fprintf(stderr, “Couldn’t initialize SDL: %s\n”,SDL_GetError());
chatd.c: fprintf(stderr, “Couldn’t initialize net: %s\n”,
SDLnet.c: SDLNet_SetError(“Couldn’t initialize Winsock 1.1\n”);

I’ve tried the below stuff as well:

[root at redhatlinux8.0 root]# DISPLAY=:0 ; export DISPLAY 
[root at redhatlinux8.0 root]# xhost + localhost 
[root at redhatlinux8.0 root]# xhost +

Edited the file /etc/ld.so.conf, and made sure it contains the line: 
 /usr/local/lib

and As root, ran /sbin/ldconfig 

I’ve also made sure /usr/local/bin is in my execution path:
[root at redhatlinux8.0 root]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/java/j2sdk1.4.0/bin

Below are some more information:

[root at redhatlinux8.0 root]# which sdl-config
/usr/local/bin/sdl-config

[root at redhatlinux8.0 root]# sdl-config --version
1.2.5
[root at redhatlinux8.0 root]# locate libSDL
/opt/tar_files/SDL-1.2.5/src/main/libSDLmain.a
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL-1.2.so.0.0.5
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL-1.2.so.0
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.so
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.lai
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.a
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.la
/opt/tar_files/SDL-1.2.5/src/libSDL.la
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image-1.2.so.0.1.2
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image-1.2.so.0
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.so
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.a
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.lai
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.la
/opt/tar_files/SDL_image-1.2.3/libSDL_image.la
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net-1.2.so.0.0.5
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net-1.2.so.0
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.so
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.a
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.lai
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.la
/opt/tar_files/SDL_net-1.2.5/libSDL_net.la
/usr/local/lib/libSDLmain.a
/usr/local/lib/libSDL-1.2.so.0.0.5
/usr/local/lib/libSDL-1.2.so.0
/usr/local/lib/libSDL.so
/usr/local/lib/libSDL.la
/usr/local/lib/libSDL.a
/usr/local/lib/libSDL_image-1.2.so.0.1.2
/usr/local/lib/libSDL_image-1.2.so.0
/usr/local/lib/libSDL_image.so
/usr/local/lib/libSDL_image.la
/usr/local/lib/libSDL_image.a
/usr/local/lib/libSDL_net-1.2.so.0.0.5
/usr/local/lib/libSDL_net-1.2.so.0
/usr/local/lib/libSDL_net.so
/usr/local/lib/libSDL_net.la
/usr/local/lib/libSDL_net.a

[root at redhatlinux8.0 SDL-1.2.5]# tail config.log
#include “confdefs.h”

  #include <sys/types.h>
  #include <sys/sem.h>

int main() {

  union semun t;

; return 0; }

[root at redhatlinux8.0 SDL_image-1.2.3]# tail config.log
configure:1974: checking whether we are using GNU C
configure:2002: checking whether gcc accepts -g
configure:2034: checking for inline
configure:2085: checking for a BSD compatible install
configure:2201: checking for sdl-config
configure:2236: checking for SDL - version >= 1.2.4
configure:2321: gcc -o conftest -g -O2 -I/usr/local/include/SDL -D_REENTRANT conftest.c -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread 1>&5
configure:2439: checking for jpeg_CreateDecompress in -ljpeg
configure:2520: checking for png_create_read_struct in -lpng
configure:2565: checking for uncompress in -lz

[root at redhatlinux8.0 SDL_net-1.2.5]# tail config.log
#line 2183 “configure”
#include “confdefs.h”
/* Override any gcc2 internal prototype to avoid an error. /
/
We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char GUI_Create();

int main() {
GUI_Create()
; return 0; }

Any advice would be very much appreciated and thanks in advance!

Yours sincerely,
Kim Leng–


Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers

Hi all,

Sorry to disturb all of you. I’ve installed all the necessary SDL libraries but I get the below error message while running freedroidRPG:

[root at redhatlinux8.0 root]# freedroidRPG
Couldn’t initialize SDL: No available video device

You’re running as root and probably logged in as another user.
X11 is typically set up to reject connections from users other than
the one logged in as a security measure.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sorry, Sam, but you didn’t look closely enough. He used xhost to lift this
security restriction and it still didn’t work. So there is some other problem
here like a missing X11 backend.

Regards,
GregorAm Samstag, 23. August 2003 19:07 schrieb Sam Lantinga:

Hi all,

Sorry to disturb all of you. I’ve installed all the necessary SDL
libraries but I get the below error message while running freedroidRPG:

[root at redhatlinux8.0 root]# freedroidRPG
Couldn’t initialize SDL: No available video device

You’re running as root and probably logged in as another user.
X11 is typically set up to reject connections from users other than
the one logged in as a security measure.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi,
maybe I can help clarify Kim’s original question a little bit after what
he told me. I think he has forgot to mention that he connects to a
linux-box remotely from another unix machine. Apparently he can
then launch xterm etc remotely with X redirection through ssh working ok,
but SDL progs seem to fail to find a video device…
At least that’s how I understand what his problem is, although I cannot
reproduce this…
Cheers,
Reinhard.On Sun, 24 Aug 2003, Gregor M?ckl wrote:

Am Samstag, 23. August 2003 19:07 schrieb Sam Lantinga:

Hi all,

Sorry to disturb all of you. I’ve installed all the necessary SDL
libraries but I get the below error message while running freedroidRPG:

[root at redhatlinux8.0 root]# freedroidRPG
Couldn’t initialize SDL: No available video device

You’re running as root and probably logged in as another user.
X11 is typically set up to reject connections from users other than
the one logged in as a security measure.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sorry, Sam, but you didn’t look closely enough. He used xhost to lift this
security restriction and it still didn’t work. So there is some other problem
here like a missing X11 backend.

Regards,
Gregor

Hi all,

Sorry to disturb all of you. I’ve installed all the necessary SDL
libraries but I get the below error message while running
freedroidRPG:

[root at redhatlinux8.0 root]# freedroidRPG
Couldn’t initialize SDL: No available video device

All my X applications such as xterm, xclock, xchat, gaim, ooffice
work fine. I’m using Red Hat Linux 8.0 with 2.4.18-14smp kernel.

I suspect that the error originates from SDL_image-1.2.3 and
SDL_net-1.2.5:

[root at redhatlinux8.0 SDL_image-1.2.3]# grep “Couldn’t
initialize” *
showimage.c: fprintf(stderr, “Couldn’t initialize
SDL: %s\n”,SDL_GetError());
Binary file showimage.o matches
[root at redhatlinux8.0 SDL_image-1.2.3]# cd …/SDL_net-1.2.5
[root at redhatlinux8.0 SDL_net-1.2.5]# grep “Couldn’t
initialize” *
chat.cpp: fprintf(stderr, “Couldn’t initialize
SDL: %s\n”,SDL_GetError());
chat.cpp: fprintf(stderr, “Couldn’t initialize
net: %s\n”,
chatd.c: fprintf(stderr, “Couldn’t initialize
SDL: %s\n”,SDL_GetError());
chatd.c: fprintf(stderr, “Couldn’t initialize
net: %s\n”,
SDLnet.c: SDLNet_SetError(“Couldn’t
initialize Winsock 1.1\n”);

I’ve tried the below stuff as well:

[root at redhatlinux8.0 root]# DISPLAY=:0 ; export DISPLAY 
[root at redhatlinux8.0 root]# xhost + localhost 
[root at redhatlinux8.0 root]# xhost +

Edited the file /etc/ld.so.conf, and made sure it contains the

line:
/usr/local/lib

and As root, ran /sbin/ldconfig 

I’ve also made sure /usr/local/bin is in my execution path:
[root at redhatlinux8.0 root]# echo $PATH

/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/java/j2sdk1.4.0/bin

Below are some more information:

[root at redhatlinux8.0 root]# which sdl-config
/usr/local/bin/sdl-config

[root at redhatlinux8.0 root]# sdl-config --version
1.2.5
[root at redhatlinux8.0 root]# locate libSDL
/opt/tar_files/SDL-1.2.5/src/main/libSDLmain.a
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL-1.2.so.0.0.5
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL-1.2.so.0
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.so
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.lai
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.a
/opt/tar_files/SDL-1.2.5/src/.libs/libSDL.la
/opt/tar_files/SDL-1.2.5/src/libSDL.la
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image-1.2.so.0.1.2
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image-1.2.so.0
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.so
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.a
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.lai
/opt/tar_files/SDL_image-1.2.3/.libs/libSDL_image.la
/opt/tar_files/SDL_image-1.2.3/libSDL_image.la
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net-1.2.so.0.0.5
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net-1.2.so.0
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.so
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.a
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.lai
/opt/tar_files/SDL_net-1.2.5/.libs/libSDL_net.la
/opt/tar_files/SDL_net-1.2.5/libSDL_net.la
/usr/local/lib/libSDLmain.a
/usr/local/lib/libSDL-1.2.so.0.0.5
/usr/local/lib/libSDL-1.2.so.0
/usr/local/lib/libSDL.so
/usr/local/lib/libSDL.la
/usr/local/lib/libSDL.a
/usr/local/lib/libSDL_image-1.2.so.0.1.2
/usr/local/lib/libSDL_image-1.2.so.0
/usr/local/lib/libSDL_image.so
/usr/local/lib/libSDL_image.la
/usr/local/lib/libSDL_image.a
/usr/local/lib/libSDL_net-1.2.so.0.0.5
/usr/local/lib/libSDL_net-1.2.so.0
/usr/local/lib/libSDL_net.so
/usr/local/lib/libSDL_net.la
/usr/local/lib/libSDL_net.a

[root at redhatlinux8.0 SDL-1.2.5]# tail config.log
#include “confdefs.h”

  #include <sys/types.h>
  #include <sys/sem.h>

int main() {

  union semun t;

; return 0; }

[root at redhatlinux8.0 SDL_image-1.2.3]# tail config.log
configure:1974: checking whether we are using GNU C
configure:2002: checking whether gcc accepts -g
configure:2034: checking for inline
configure:2085: checking for a BSD compatible install
configure:2201: checking for sdl-config
configure:2236: checking for SDL - version >= 1.2.4
configure:2321: gcc -o conftest -g -O2 -I/usr/local/include/SDL
-D_REENTRANT conftest.c -L/usr/local/lib -Wl,-rpath,/usr/local/lib
-lSDL -lpthread 1>&5
configure:2439: checking for jpeg_CreateDecompress in -ljpeg
configure:2520: checking for png_create_read_struct in -lpng
configure:2565: checking for uncompress in -lz

[root at redhatlinux8.0 SDL_net-1.2.5]# tail config.log
#line 2183 “configure”
#include “confdefs.h”
/* Override any gcc2 internal prototype to avoid an error. /
/
We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char GUI_Create();

int main() {
GUI_Create()
; return 0; }

Any advice would be very much appreciated and thanks in advance!

Yours sincerely,
Kim Leng–


Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers

“Kim Leng Goh” ha scritto nel messaggio
news:20030829150225.29977.qmail at mail.com

Sorry to disturb all of you. I’ve installed all the necessary SDL
libraries but I get the below error message while running
freedroidRPG:

it’s sems you use the winversion of the sdl :wink: recompile it for linux …
and disable wine (and emulator to launch exe windows like if you dont want
to launch a win app).

IMHO

See you