On Wed, Dec 12, 2001 at 05:22:56PM -0600, Daniel Pothier wrote:
>    I have written a small program utilizing SDL and svgalib.
>Everything is working perfectly. I was wondering however if there is
>some way to start it remotely (through SSH). I have successfully run
>some of the svgalib demos remotely, however the program utilizing SDL
>fails. I am wondering if this has something to do with the way SDL
>calls vga_init.

SDL has some checks in the code to make sure that you are the owner of
the current console before it'll start up, so without removing those
checks it won't work.  Check out the SVGA_available function in
SDL's src/video/svga/SDL_svgavideo.c to fix it.

Here's a snippet:

  static int SVGA_Available(void)
  {
      /* Check to see if we are root and stdin is a virtual console */
      int console;
      [...]
      return(((svgalib2 != -1) || (geteuid() == 0)) && (console >= 0));
  }


So if you remove the last part of that return function, it should do
what you want:

      return((svgalib2 != -1) || (geteuid() == 0));


Bryan

-- 
  http://www.bokeoa.com/    | [EMAIL PROTECTED]
  GPG fingerprint: 33F7 44F2 8612 E02F 8DE8  97FB 621E 8A36 6DC1 32AF

------------------------------------------------------------------
Unsubscribe:  To:   [EMAIL PROTECTED]
              Body: unsubscribe linux-svgalib

Reply via email to