libSDL versus XDM authentication

Sean C. Farley scf at
Tue Jan 19 23:43:31 UTC 2010

I recall running into this in the past with some application I cannot 
recall at the moment, yet I just bumped into it again recently when 
trying to run multimedia/pwcview.

# pwcview
Webcam set to: 320x240 (sif) at 5 fps
XDM authorization key matches an existing client!Failed to init sdl: Couldn't open X11 display

The issue is that xdm uses XDM-AUTHORIZATION-1 authentication, so I have 
these as well as MIT-MAGIC-COOKIE-1 listed within ~/.Xauthority.  libSDL 
by default does not like this.

Three possible solutions and one guess are available:
1. Link pwcview with libX11.
2. Add 'DisplayManager*authName:  MIT-MAGIC-COOKIE-1' to xdm-config.
3. (untested) Configure libSDL to be built with
    SDL_VIDEO_DRIVER_X11_DYNAMIC defined and src/video/x11/SDL_x11video.c
    changed to include FreeBSD with __osf__ in the check.  This causes it
    try again after one second.  The comment claims that this works for
    this issue.
4. Linking libX11 to libSDL?  It is just a thought.


P.S. libSDL 1.2.14 is available.
scf at

More information about the freebsd-ports mailing list