This discussion is archived
0 Replies Latest reply: Apr 9, 2013 3:25 AM by 854182 RSS

Solaris 11 XOpenDisplay return NULL

854182 Newbie
Currently Being Moderated
I am getting problem while running following program over Solaris 11. The XOpenDisplay function always return NULL. The same program run fine over Solaris 10.

#include <stdio.h>
#include <X11/Xlib.h>

int main(int argc, char** argv) {
Display *ptr = 0;


ptr = XOpenDisplay("machine_name:0.0");

if (0 == ptr)
{
printf("NULL received\n");
}
else
{
printf("Valid pointer received\n");
}

return 0;
}


During investigation I have found that the Solaris 11 do not accept direct X11 connections by using the TCP protocol. I have enabled the TCP for X11-server using the following command.

svccfg -s x11-server setprop options/tcp_listen=true

But during calling the function XOpenDisplay still returns the NULL and now I am getting the error as "no protocol specified".

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points