detecting where I am
- From: Martin Oberzalek <oberzalek chello at>
- To: gnome-devel-list gnome org
- Subject: detecting where I am
- Date: Wed, 26 Jan 2000 14:47:07 +0100
How can I detect if am on a console?
Currently I do that:
#include <X11/Xlib.h>
....
int main (int argc, char *argv[])
{
Display *dis;
if( (dis = XOpenDisplay(NULL)) == NULL )
{
/* print help screen and some other stuff */
return 0;
}
else
{
XCloseDisplay( dis );
gnome_init( APPLICATION, VERSION, argc, argv );
/* gnome stuff */
return 0;
}
}
That code works very well.
My question now: Is there a better way?
--
The linux is with me.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]