XDisplayString()XDisplayString()Name
XDisplayString, DisplayString – get string passed to XOpenDisplay().
Synopsis
char *XDisplayString(display)
Display *display;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
Returns
The display name string.
DescriptionXDisplayString() returns the string that was passed to XOpenDisplay()
when the current display was opened. On POSIX-conformant systems, if
the passed string was NULL, it returns the value of the DISPLAY envi‐
ronment variable when the current display was opened.
XDisplayString() is useful for printing error messages when XOpenDis‐
play() fails, and for applications that invoke the fork system call and
want to open a new connection to the same display from the child
process.
The C language macro DisplayString() is equivalent and slightly more
efficient. XDisplayName() is also a similar function.
See AlsoXOpenDisplay().
Xlib - Macro Equivalents XDisplayString()