l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 17:07

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] detecting X from within C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] detecting X from within C

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,

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 <hajhouse@houseag.com> 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..."      p@dirac.org
>                                -- Mailer Daemon              www.dirac.org/p

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.