[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 02:14:09 PST 2015
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
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 674aeca..7eaba9e 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -1080,9 +1080,12 @@ wl_socket_init_for_display_name(struct wl_socket
*s, const char *name)
int name_size;
const char *runtime_dir;
- runtime_dir = getenv("XDG_RUNTIME_DIR");
+ runtime_dir = getenv("WAYLAND_SERVER_SOCKET_DIR");
if (!runtime_dir) {
- wl_log("error: XDG_RUNTIME_DIR not set in the environment\n");
+ runtime_dir = getenv("XDG_RUNTIME_DIR");
+ }
+ if (!runtime_dir) {
+ wl_log("error: XDG_RUNTIME_DIR or WAYLAND_SERVER_SOCKET_DIR not set
in the environment\n");
/* to prevent programs reporting
* "failed to add socket: Success" */
More information about the wayland-devel
mailing list