The question was two-fold, as I understood it.
Testing for X/ncurses and Testing for Console.

The approach suggested below -- the use of the ncurses
pre-init routines is a library as opposed to environment
approach to testing for X/ncurses as well as console,
non-console.

I suppose the DISPLAY can be used by its value to
determine the console target, but that implies a console
target, not a console environment, unless I'm wrong.

In any case, the library approach seemed to be a more
sure fire method.

Brian S.

Peter Jay Salzman wrote:

> begin: Henry House <[EMAIL PROTECTED]> quote
> > On Mon, Jul 16, 2001 at 11:31:30AM -0700, Peter Jay Salzman wrote:
> > [...]
> > > from.  how is this done from C?
> >
> > Usually one checks for the existance of a non-empty DISPLAY.
>
> cool beans.  works like a charm.  it's neat to be able to run this program
> from both console and X.   very cool...
>
> thanks!
>
> pete
>
> --
> "The following addresses had permanent fatal errors..."      [EMAIL PROTECTED]
>                                -- Mailer Daemon              www.dirac.org/p

Reply via email to