<div dir="ltr">Thanks, every time I tried XWayland I though a thing like this was needed. I have a few comments though:<br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/13 Maksim Melnikau <span dir="ltr"><<a href="mailto:maxposedon@gmail.com" target="_blank">maxposedon@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Signed-off-by: Maksim Melnikau <<a href="mailto:maxposedon@gmail.com">maxposedon@gmail.com</a>><br>

---<br>
 man/weston.man          | 3 +++<br>
 src/weston-launch.c     | 4 ++++<br>
 src/xwayland/launcher.c | 9 +++++++--<br>
 3 files changed, 14 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/man/weston.man b/man/weston.man<br>
index 39d854b..94c87d3 100644<br>
--- a/man/weston.man<br>
+++ b/man/weston.man<br>
@@ -240,6 +240,9 @@ If set, specifies the directory where to look for<br>
 .B XDG_RUNTIME_DIR<br>
 The directory for Weston's socket and lock files.<br>
 Wayland clients will automatically use this.<br>
+.TP<br>
+.B XSERVER_PATH<br>
+Override xserver to run.<br>
 .<br>
 .\" ***************************************************************<br>
 .SH DIAGNOSTICS<br>
diff --git a/src/weston-launch.c b/src/weston-launch.c<br>
index 7264f7e..2b26c9c 100644<br>
--- a/src/weston-launch.c<br>
+++ b/src/weston-launch.c<br>
@@ -504,6 +504,7 @@ setup_session(struct weston_launch *wl)<br>
 {<br>
        char **env;<br>
        char *term;<br>
+       char *xserver;<br>
        int i;<br>
<br>
        if (wl->tty != STDIN_FILENO) {<br>
@@ -514,9 +515,12 @@ setup_session(struct weston_launch *wl)<br>
        }<br>
<br>
        term = getenv("TERM");<br>
+       xserver = getenv("XSERVER_PATH");<br></blockquote><div>I'm not sure XSERVER_PATH is a good name. I would at least put a WESTON_ or before it, as it's specific to it.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

        clearenv();<br>
        if (term)<br>
                setenv("TERM", term, 1);<br>
+       if(xserver)<br></blockquote><div>style: put a space after the 'if'.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

+               setenv("XSERVER_PATH", xserver, 1);<br>
        setenv("USER", wl->pw->pw_name, 1);<br>
        setenv("LOGNAME", wl->pw->pw_name, 1);<br>
        setenv("HOME", wl->pw->pw_dir, 1);<br>
diff --git a/src/xwayland/launcher.c b/src/xwayland/launcher.c<br>
index b639479..ae1fcb1 100644<br>
--- a/src/xwayland/launcher.c<br>
+++ b/src/xwayland/launcher.c<br>
@@ -42,6 +42,7 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data)<br>
        struct weston_xserver *wxs = data;<br>
        char display[8], s[8];<br>
        int sv[2], client_fd;<br>
+       char *xserver = NULL;<br>
<br>
        if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv) < 0) {<br>
                weston_log("socketpair failed\n");<br>
@@ -62,8 +63,12 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data)<br>
<br>
                snprintf(display, sizeof display, ":%d", wxs->display);<br>
<br>
-               if (execl(XSERVER_PATH,<br>
-                         XSERVER_PATH,<br>
+               xserver = getenv("XSERVER_PATH");<br>
+               if(!xserver)<br></blockquote><div>also here.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

+                         xserver = XSERVER_PATH;<br>
+<br>
+               if (execl(xserver,<br>
+                         xserver,<br>
                          display,<br>
                          "-wayland",<br>
                          "-rootless",<br>
<span class=""><font color="#888888">--<br>
1.8.3.2<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div></div>