display using unix-domain socket

Antoine Martin antoine at nagafix.co.uk
Sun Oct 7 10:53:12 PDT 2012


> Now might be a good time to revive this patch which has been submitted
> before by Timo Juhani Lindfors (CCed):
> https://www.xpra.org/trac/attachment/ticket/172/X11-unix-domain-socket.patch
> 
> It would be very useful for us to avoid having to find a free display
> TCP port to use with the Vfb X11 server (Xdummy), we could just allocate
> a private socket as needed.
> 
> I suspect that the concerns will be security related. I don't mind
> coding and testing to ensure this new display mode cannot be abused, but
> at this point I am not entirely sure that any checks are actually needed.
Attached is an ugly minimal patch to xcb-util's xcb_parse_display and
xcb_open so that one can specify a full unix paths to the server's
socket, ie:
DISPLAY=:unix:/tmp/.X11-unix/X10 xlsclients
or if you use your own socket location (chroot or otherwise):
DISPLAY=:unix:/private/socket xlsclients

Are there any good reasons against it? (after a thorough clean up or
even a complete rewrite obviously). I can't think of a good one.
After all, the clients should be able to choose where they connect to
outside of the pre-defined /tmp/.X11-unix/ socket location without
having to resort to ugly tricks like this one (same result):
socat UNIX-LISTEN:/tmp/.X11-unix/:666 UNIX-CONNECT:/private/socket
DISPLAY=:666 xlsclients

Cheers
Antoine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xcb-unix-domain-fullpath.patch
Type: text/x-patch
Size: 1403 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121008/93eb244a/attachment.bin>


More information about the xorg-devel mailing list