[PATH wayland] allow to set server socket dir on a different directory than XDG_RUNTIME_DIR

Bettio, Davide davide.bettio at ispirata.com
Thu Feb 5 16:21:41 PST 2015


Hello,

Il 2015-02-05 19:31 Bryce Harrington ha scritto:
> On Thu, Feb 05, 2015 at 11:14:09AM +0100, Bettio, Davide wrote:
>> commit 68beb2b60f851c74b982b0a23da4bb1ce375efcf
>> Author: Davide Bettio <davide.bettio at ispirata.com>
>> Date:   Wed Feb 4 13:46:19 2015 +0100
>> 
>>     Allow to explicitly set wayland server socket dir using
>> WAYLAND_SERVER_SOCKET_DIR
> 
> Could you elaborate further on why you'd use this, as opposed to say
> controlling XDG_RUNTIME_DIR, or even manually establishing the socket
> file and specifying it via WAYLAND_SOCKET?  (Not that I'm arguing we
> don't need this, but rather to make sure we can clearly explain why a
> user would use one mechanism vs. another.)

I think XDG_RUNTIME_DIR shouldn't be changed in more complex situations 
where a correct
XDG_RUNTIME_DIR is required, so it might not be a viable option.
According to the sources WAYLAND_SOCKET env var is not used at all on 
the server side so the problem cannot be
fixed that way, unless we add support for it on the server side too.
I think that using WAYLAND_SERVER_SOCKET_DIR makes quite easy to control 
the socket path by
just changing the environment in several situations, this can be easily 
done using a systemd
.service file for example or any bash script.
If we want to avoid to introduce any further environment var we may 
extend the semantic of WAYLAND_DISPLAY
to accept also absolute paths (we just need to check WAYLAND_DISPLAY[0] 
== '/' for that) instead of introducing WAYLAND_SERVER_SOCKET_DIR.

Regards,
Davide Bettio.



More information about the wayland-devel mailing list