Stephen J. Turnbull wrote:
You can work around it by forcing an IPv4 address for the display,
either with DISPLAY or -d. There's a patch there for permanently
forcing IPv4 behavior, if you want to do it in your own copy.
Kyle> Me too. I think the DNS lookups at startup should go away.
Yeah, I promised Karl Kleinpaste I'd make a configure option. (Martin
vetoed removing it.) Mea culpa maxima, not done yet. I apologize for
the delay, but I do not understand this stuff well (IPv6 or
configure). A patch to configure.in to make the patch in PROBLEMS an
option would be gratefully accepted. A report on a test that it works
would be nice, too.
Having looked a bit further at the code to canonicalise an X display
specification, it doesn't seem to handle DECnet specifiers, or
explicit protocol specifications. The comment above
split_up_display_spec() says:
/* Parse a DISPLAY specification like "host:10.0" or ":0" */
However, the comment above _X11TransConnectDisplay() in Xlib says:
/*
* Attempts to connect to server, given display name. Returns file descriptor
* (network socket) or -1 if connection fails. Display names may be of the
* following format:
*
* [protocol/] [hostname] : [:] displaynumber [.screennumber]
*
* The second colon indicates a DECnet style name. No hostname is interpretted
* as the most efficient local connection to a server on the same machine.
* This is usually:
*
* o shared memory
* o local stream
* o UNIX domain socket
* o TCP to local host
*
* This function will eventually call the X Transport Interface functions
* which expects the hostname in the format:
*
* [protocol/] [hostname] : [:] displaynumber
*
*/
Note that these don't require any explicit support from the
application; XOpenDisplay(NULL) and XOpenDisplay(<arbitrary string>)
will do the right thing automatically.
Maybe the canonicalisation code should go, and the value of $DISPLAY
just used as-is. Anything else is bound to get it wrong in some cases.
--
Glynn Clements <glynn.clements(a)virgin.net>