<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 3, 2017 at 2:33 AM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 2 Nov 2017 10:07:28 -0500<br>
Matt Hoosier <<a href="mailto:matt.hoosier@gmail.com">matt.hoosier@gmail.com</a>> wrote:<br>
<br>
> On Thu, Nov 2, 2017 at 3:36 AM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
><br>
> > On Wed, 1 Nov 2017 13:44:50 -0500<br>
> > Matt Hoosier <<a href="mailto:matt.hoosier@gmail.com">matt.hoosier@gmail.com</a>> wrote:<br>
> ><br>
<br>
> > ><br>
> > > I'd like to call attention to another difficult point in using Wayland<br>
> > for<br>
> > > a device that acts more like a smartphone than a desktop: the main logic<br>
> > in<br>
> > > wl_display_connect() always attempts to contact a server socket living at<br>
> > > ${XDG_RUNTIME_DIR}/${WAYLAND_<wbr>DISPLAY}.<br>
<br>
Hi,<br>
<br>
I rewrote the subject with the hope to raise more interest, being more<br>
specific to the proposals.<br>
<br>
> > I can also imagine that it may not be feasible to create<br>
> > application-user specific sockets for everything, so there could be a<br>
> > need for a common socket file somewhere that is not tied to<br>
> > XDG_RUNTIME_DIR. With a good justification written down, I suspect that<br>
> > would be fine. We just need to figure out the details on how to do that<br>
> > exactly.<br>
> ><br>
> > Modifying the meaning of WAYLAND_DISPLAY environment variable to<br>
> > support also absolute paths has been proposed before IIRC. Maybe<br>
> > resurrecting that work could be a way forward? Can anyone see a problem<br>
> > with that?<br>
> ><br>
><br>
> This would definitely work, so I don't object if this is the preference of<br>
> other reviewers. I would prefer (for the reasons coming below) the<br>
> /run/wayland/$WAYLAND_DISPLAY suggestion though.<br>
><br>
> One note about this: this would contain a subtle change in behavior to<br>
> existing users of $WAYLAND_DISPLAY. If somebody sets<br>
> WAYLAND_DISPLAY="/wayland-0" currently, this works okay. The concatenation<br>
> logic in wl_display_connect() results in a string<br>
> "/run/user/<uid>//wayland-0", which is valid despite the duplicate '/'. If<br>
> $WAYLAND_DISPLAY is now examined for absolute-pathiness, the logic would<br>
> probably see "/wayland-0" as an absolute path reference, and the connection<br>
> attempt would fail.<br>
<br>
While this is true, I don't think it is a blocker unless we find out<br>
about tools or compositors doing so.<br>
<br>
<br>
> ><br>
> > The suggestion to automatically look for a fallback socket<br>
> > at /run/wayland/$WAYLAND_DISPLAY with WAYLAND_DISPLAY defaulting to<br>
> > "wayland-0" sounds reasonable to me, but I wouldn't feel comfortable<br>
> > making that review decision alone. I do know some people are eager to<br>
> > avoid mandatory environment variables if something can be found by<br>
> > convention.<br>
> ><br>
><br>
> This would be my preference. The fewer tweaks to environment variables are<br>
> required, the better in my opinion.<br>
<br>
Right, so there is interest to both ideas, and I don't see them as<br>
mutually exclusive. I believe one can also write a good justification<br>
for each, so now I'd be looking for reasons why either might be<br>
unwanted and acks for each, so that we get enough buy-in to "bless" the<br>
behavioural change in libwayland-client.<br>
<br>
People, give your acks/nacks for the two ideas, please:<br>
<br>
- modify WAYLAND_DISPLAY to support absolute paths which overrides<br>
  any search paths<br></blockquote><div><br></div><div>Ack</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- when the current socket search fails, add one more place to look<br>
  in: /run/wayland/$WAYLAND_DISPLAY with the default "wayland-0" if<br>
  WAYLAND_DISPLAY is not set.<br></blockquote><div><br></div><div>Ack</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
The last proposed patch for absolute paths is probably<br>
<a href="https://lists.freedesktop.org/archives/wayland-devel/2015-August/023838.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>archives/wayland-devel/2015-<wbr>August/023838.html</a><br>
which looks like it got ignored mostly because of a damaged submission<br>
and mixed-up (nowadays probably unwanted) server-side changes. The<br>
patch also lacks the rationale and justification in the commit message.<br>
This is FYI for anyone wanting to carry on that work.<br>
<br>
<br>
Thanks,<br>
pq<br>
</blockquote></div><br></div></div>