[Originally reported against Solaris as Sun bug id #4624183, fixed in Solaris 9.]
If you specify no hostname in your display (i.e. "DISPLAY=:0"), Xlib will try to
connect via local connections such as Unix domain sockets or pipes. If neither
of those works it gives up. If you instead specify the display as hostname:0 it
will fall back to attempting to connect to TCP. It should also attempt this fall
back for the no-hostname case, for dealing with programs such as xscope which only
open TCP sockets, or for X servers started with -nolisten options to prevent use
of the local transports.
Start an Xnest on :5 with -nolisten options appropriate for your platform to
disable local transports (or simply rm /tmp/.X11-*/X5 after starting it).
Run 'xdpyinfo -display :5' and see if it can connect or not - after this patch
is applied, it should be able to connect.
Created attachment 232 [details] [review]
Patch to xc/lib/X11/ConnDis.c
Fix committed to CVS head:
Changes by: alanc at pdx. 04/04/24 16:39:25
Bugzilla #546: XOpenDisplay should try tcp connection if local
connections fail (aka Sun bug id #4624183).
Also includes fix from NetBSD Problem Report #25098 (Michael van Elst)
(Xlib segfaults with IPv6 if compiled with HASXDMAUTH).
Add missing shared library dependencies for Solaris
Revision Changes Path
1.3 +37 -3 xc/config/cf/sunLib.tmpl
1.3 +5 -0 xc/lib/FS/Imakefile
1.3 +19 -14 xc/lib/X11/ConnDis.c