Re: Running an svgalib app from init

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Wed 04 Dec 2002 - 10:57:36 IST


On Wed, 4 Dec 2002, Tonnesen Steve wrote:

> Is it possible to run an svgalib application from init?I get the "Not
> running in a graphics capable console, and unable to find one" error when
> I attempt to do so.

Program that run from init don't have a controlling tty, which svgalib
needs. Therefore, you must set a controlling tty before calling
vga_init(). This can be done by:

i=open("/dev/tty1", O_RDWR);
ioctl(i, TIOCSCTTY, 1);

If you are trying to run a program that you did not write, and you don't
want to compile a special version of it, simply write a program that
sets a tty and the execs the program you want.

-- 
Matan Ziv-Av.                         matan@svgalib.org



------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:25 IST