[Xcb] connection issue using xcb in libX11

Josh Triplett josh at joshtriplett.org
Thu Apr 29 13:56:21 PDT 2010


On Thu, Apr 29, 2010 at 01:05:48PM -0700, Jeremy Huddleston wrote:
> 
> On Apr 29, 2010, at 12:39, Jamey Sharp wrote:
> 
> > I don't think it makes sense to do it in libX11; we'd have to do
> > DISPLAY-string mangling there, which seems silly.

I don't think we'd have to mangle DISPLAY; just pass arguments to
xcb_connect.  And that seems like a good idea, to preserve Xlib's
semantics without putting them into XCB.

> > I find I'm tempted to say that if the user wants TCP, they darn well
> > should have asked for it. ;-)
> 
> Yeah, I agree... but this fallback already exists in the wild.

I find it quite dubious that real applications expect DISPLAY=:0 to
connect to TCP.  It certainly violates the principle of least surprise.

I just looked at Xlib, and it seems to implement this logic in
ConnDis.c; it has a list of local transports, defined at ./configure
time, which it proceeds through if the initial attempt with an undefined
protocol fails.  Implementing this logic somewhere common to the Xtrans
and XCB code paths makes sense.  However, I don't think a fallback to
TCP in XCB makes sense, because then we might need to add other
platform-specific local fallbacks for other platforms.

- Josh Triplett


More information about the xorg-devel mailing list