Skip Menu |

This queue is for tickets about the X11-Protocol CPAN distribution.

Report information
The Basics
Id: 40841
Status: open
Priority: 0/
Queue: X11-Protocol

People
Owner: SMCCAM [...] cpan.org
Requestors: nathan.stocks [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Bug: OS X 10.5.5 (Leopard)
Date: Tue, 11 Nov 2008 17:15:57 -0700
To: bug-X11-Protocol [...] rt.cpan.org
From: Nathan <nathan.stocks [...] gmail.com>
I'm not sure if this bug is specific to X11::Protocol or not, but I don't know where else to report this to. On OS X 10.5.5 (Leopard) I try to run ClusterSSH which uses X11::Protocol I get the following error, which seems to indicate that X11::Protocol is rejecting a valid $DISPLAY value: $ cssh support1 Can't connect to display `tmp/launch-ICEBGq/:0': Invalid argument at /Library/Perl/5.8.8/X11/Protocol.pm line 2270 I would be happy to provide more information, just let me know what info to provide. Please see this thread for more information on how this came up: http://lists.apple.com/archives/x11-users/2008/Nov/msg00040.html ~ Nathan
Subject: Bug: OS X 10.5.5 (Leopard) launchd DISPLAY format
On Tue Nov 11 19:16:16 2008, nathan.stocks@gmail.com wrote: Show quoted text
> I'm not sure if this bug is specific to X11::Protocol or not, but I > don't know where else to report this to. > > On OS X 10.5.5 (Leopard) I try to run ClusterSSH which uses > X11::Protocol I get the following error, which seems to indicate that > X11::Protocol is rejecting a valid $DISPLAY value: > > $ cssh support1 > Can't connect to display `tmp/launch-ICEBGq/:0': Invalid argument at > /Library/Perl/5.8.8/X11/Protocol.pm line 2270 > > I would be happy to provide more information, just let me know what > info to provide. > > Please see this thread for more information on how this came up: > http://lists.apple.com/archives/x11-users/2008/Nov/msg00040.html
Thanks for the report; this is the right place to send it. It looks like Apple has extended the format of the DISPLAY variable in order to support automatically launching the server, and X11::Protocol doesn't understand the new format. For normal C X applications, this works automatically because they updated Xlib to match, but X11::Protocol is an independent implementation, so will need an independent fix. As someone else in one of those discussions suggested, you can work around the problem by manually setting the DISPLAY variable to an older format that X11::Protocol already understands. From looking at a patch that fixes this issue in OpenSSH, it looks like this "launch" display is like a standard Unix-domain socket connection, just in a non-standard location. What's going wrong at the moment is that X11::Protocol only recognizes "" and "unix" as Unix-domain sockets; instead, it's assuming it's a TCP/IP hostname, which obviously isn't going to work. I'm guessing that the fix, to right around the place where the error is being reported and Protocol::Connection::UNIX*, is to recognize this format as being a Unix socket, and then to translate it into the right location. Two useful pieces of information, if you can get them easily, would be if there's any official documentation on this new format (the old ones are described in the X(1) manpage, at least on my Linux system), and if you can confirm the actual location of the socket in question (it should show up like a file, but with type "s" in "ls -l"). I don't have a Mac, so it will also be useful if you can test a fix. Thanks, -- Stephen
Subject: Re: [rt.cpan.org #40841] Bug: OS X 10.5.5 (Leopard) launchd DISPLAY format
Date: Sun, 16 Nov 2008 22:02:31 -0700
To: bug-X11-Protocol [...] rt.cpan.org
From: Nathan <nathan.stocks [...] gmail.com>
On Sat, Nov 15, 2008 at 4:54 PM, Stephen_McCamant via RT <bug-X11-Protocol@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40841 > > > Thanks for the report; this is the right place to send it. > > It looks like Apple has extended the format of the DISPLAY variable in > order to support automatically launching the server, and X11::Protocol > doesn't understand the new format. For normal C X applications, this > works automatically because they updated Xlib to match, but > X11::Protocol is an independent implementation, so will need an > independent fix. > > As someone else in one of those discussions suggested, you can work > around the problem by manually setting the DISPLAY variable to an older > format that X11::Protocol already understands. > > From looking at a patch that fixes this issue in OpenSSH, it looks like > this "launch" display is like a standard Unix-domain socket connection, > just in a non-standard location. What's going wrong at the moment is > that X11::Protocol only recognizes "" and "unix" as Unix-domain sockets; > instead, it's assuming it's a TCP/IP hostname, which obviously isn't > going to work. > > I'm guessing that the fix, to right around the place where the error is > being reported and Protocol::Connection::UNIX*, is to recognize this > format as being a Unix socket, and then to translate it into the right > location. Two useful pieces of information, if you can get them easily, > would be if there's any official documentation on this new format (the > old ones are described in the X(1) manpage, at least on my Linux > system), and if you can confirm the actual location of the socket in > question (it should show up like a file, but with type "s" in "ls -l"). > I don't have a Mac, so it will also be useful if you can test a fix. > > Thanks, > > -- Stephen
Here's the information you asked for. 1) "..documentation on this new format": See the answer from Jeremy Huddleston (Apple X11 guy) quoted at the bottom of this message. 2) Confirmation of the actual location of the socket in question: $ echo $DISPLAY /tmp/launch-V54bVk/:0 $ ls -l /tmp/launch-V54bVk total 0 srwx------ 1 nathan wheel 0 Nov 16 00:40 :0 3) Of course I'd be happy to test it! Also, if you join the x11-users mailing list at lists.apple.com, I'm sure many of the people on that list would also be happy to test it. ~ Nathan On Sun, Nov 16, 2008 at 11:54 AM, Jeremy Huddleston <jeremyhu@apple.com> wrote: Show quoted text
> Here are the patches for libxcb and libX11 as reference: > > http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=commitdiff;h=e8d4cefa0837afa149a10e981528b368485a9e38 > > I don't think the format is in the xorg-docs... I'll check that out... but > it's straight forward... if DISPLAY starts with the string "/tmp/launch", > then treat it as the path to the unix socket to use. > > On Nov 16, 2008, at 10:21, Nathan wrote: >
>> On Sat, Nov 15, 2008 at 4:54 PM, Stephen_McCamant via RT >> Could someone help me with where to point Stephen to "official >> documentation on this new format" of the DISPLAY variable? >> X11::Protocol needs to be updated to support the launchd format of >> DISPLAY so that it works on OS X.
Subject: Re: [rt.cpan.org #40841] Bug: OS X 10.5.5 (Leopard) launchd DISPLAY format
Date: Mon, 17 Nov 2008 16:35:25 -0700
To: bug-X11-Protocol [...] rt.cpan.org
From: Nathan <nathan.stocks [...] gmail.com>
On Sat, Nov 15, 2008 at 4:54 PM, Stephen_McCamant via RT <bug-X11-Protocol@rt.cpan.org> wrote: Show quoted text
Piotr Grzybowski offered the suggestion below. I'm passing it along in case it proves helpful! On Mon, Nov 17, 2008 at 11:05 AM, Piotr Grzybowski <narsil.pl@gmail.com> wrote: Show quoted text
> ehlo, > > just wondering, since the ''new format'' of the DISPLAY variable > points to the socket in unix domain (right?), all you have to do is to > make a link to it, and point the DISPLAY variable, then Protocol.pm > instead of going into: > > 2269 require 'X11/Protocol/Connection/INETSocket.pm'; > 2270 $conn = X11::Protocol::Connection::INETSocket > 2271 ->open($host, $dispnum); > > will stop the interpreter with error ;-)) earlier: > > 2262 if ($host eq 'unix') { > 2263 require 'X11/Protocol/Connection/UNIXSocket.pm'; > 2264 $conn = X11::Protocol::Connection::UNIXSocket > 2265 ->open($host, $dispnum); > > now we only need to know where are the unix domain sockets.. > Also, I guess that changing Protocol.pm:2262 to > > 2262 if ($host eq 'unix' || $host=~/\/tmp\//) { > > or something like this (it's been a while since i did perl) > should do the trick.. > > yours, > pg