SDL_SetVideoMode() problems

I’m writing a simple game in sdl under linux, but I have two basic problems:

  1. the SDL_SetVideoMode() falis, unless the program is started from root
    account. The screen just fills with some strange pattetrn and
    SDL_GetError() returns "Unable to open a console terminal"
    2)i can’t manage to open a windowed video mode. no matter flags i use it
    always is fulscreen

kuba marek