No video device device on Solaris

Hello!

I have a a problem. The program
#include <SDL.h>

#include

int main(int argc, char * argv[]) {
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
std::cerr << "Could not initialize SDL: " << SDL_GetError() << ‘\n’;
return 1;
}
SDL_Quit();
}

gives the output
Could not initialize SDL: No available video device

xdpyinfo gives
name of display: :5.0
version number: 11.0
vendor string: Sun Microsystems, Inc.
vendor release number: 6610
maximum request size: 262140 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, MSBFirst, 32
image byte order: MSBFirst
number of supported pixmap formats: 3
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 254
focus: window 0xa8000b, revert to PointerRoot
number of extensions: 29
AccessX
Adobe-DPS-Extension
DOUBLE-BUFFER
DPMS
DPSExtension
Extended-Visual-Information
FBPM
GLX
LBX
MIT-SCREEN-SAVER
MIT-SHM
MIT-SUNDRY-NONSTANDARD
Multi-Buffering
RECORD
RENDER
SECURITY
SHAPE
SUN_ALLPLANES
SUN_DGA
SUN_OVL
SUN_SME
SYNC
SolarisIA
TOG-CUP
XC-APPGROUP
XC-MISC
XInputDeviceEvents
XInputExtension
XTEST
default screen number: 0
number of screens: 1

screen #0:
dimensions: 1152x900 pixels (325x254 millimeters)
resolution: 90x90 dots per inch
depths (3): 1, 24, 32
root window id: 0x2e
depth of root window: 24 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x22
default number of colormap cells: 256
preallocated pixels: black 0, white 16777215
options: backing-store YES, save-unders YES
largest cursor: 64x64
current input event mask: 0xd84031
KeyPressMask EnterWindowMask LeaveWindowMask
KeymapStateMask SubstructureNotifyMask SubstructureRedirectMask
PropertyChangeMask ColormapChangeMask
number of visuals: 1
default visual id: 0x20
visual:
visual id: 0x20
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff, 0xff00, 0xff0000
significant bits in color specification: 8 bits

I think I am using a thin client. What should I do?

Hmm…

I somehow got it to work by adding some debug output to SDL. I did not change anything else. Wired!> ----- Original Message -----

From: @Erik_Sigra (Erik Sigra)
To: sdl at libsdl.org
Date: Wed, 03 Dec 2003 22:56:24 +0100
Subject: [SDL] No video device device on Solaris

Hello!

I have a a problem. The program
#include <SDL.h>

#include

int main(int argc, char * argv[]) {
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
std::cerr << "Could not initialize SDL: " << SDL_GetError() << ‘\n’;
return 1;
}
SDL_Quit();
}

gives the output
Could not initialize SDL: No available video device