Re: detecting where I am

On Wed, Jan 26, 2000 at 08:57:06AM -0500, Maximilien Lincourt wrote:
>  This only checks if you can open the display, you can 
> be local, remote and still be able to open the display, 
> and you can also not create the display.

Yes that's exactly what I want.
I only want to know if a X-Server is available thus the program can react.

> you can check the "DISPLAY" environment variable
> to see if it's either ":.0", ":localhost" or 
> "<local_machine>:0"

That's not neccesary. 
	XOpenDisplay( NULL );  
if the parameter is NULL
xlib does this automatically.

man XOpenDisplay.

The linux is with me.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]