Path: utzoo!utgpu!watmath!clyde!att!ucbvax!bloom-beacon!TUB.BITNET!net From: net@TUB.BITNET (Oliver Laumann) Newsgroups: comp.windows.x Subject: Re: XOpenDisplay failing "sometimes" Message-ID: <8812021058.AA21753@tub.UUCP> Date: 2 Dec 88 10:58:30 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 21 > When XOpenDisplay fails is there something I can do to figure out why? Unfortunately, you can't. I found this out yesterday when I tried to run a program under 4.3 BSD that has been compiled and linked together with the Xlib under 4.2 BSD. XOpenDisplay() refused to open the display, although the program worked fine under 4.2 BSD. In my desparation I put a printf() in front of each "return NULL" and "return -1" in XOpenDis.c and XConnDis.c and linked the program with the hacked XOpenDis.o and XConnDis.o to find out that the connect() failed with an errno of EHOSTUNREACH. The reason for this is an incompatibility between the 4.2 and 4.3 gethostbyname(). It had saved me at least half an hour of time if there were a way to find out why XOpenDisplay() failed, possibly together with the errno if applicable. -- Regards, Oliver Laumann, Technical University of Berlin, Germany. ...!pyramid!tub!net or net@TUB.BITNET