aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-22 08:44:45 +0100
committerGitHub <noreply@github.com>2018-04-22 08:44:45 +0100
commit704bc490a7d1ce581ba24ce833919036374293f9 (patch)
tree8337c477561e4fd16143cf9afbac29511e22bc53 /xwayland
parent4b2f56cc01279801641b695e071c6e5c94d78469 (diff)
parenta470f101c14b62b8a0c902cbd182443f401ce6d3 (diff)
Merge pull request #886 from n3rdopolis/patch-2
xwayland: preserve the PATH variable
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/xwayland.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index bdb2c0d6..04f4f6f9 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -103,6 +103,7 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
}
const char *xdg_runtime = getenv("XDG_RUNTIME_DIR");
+ const char *path_var = getenv("PATH");
if (!xdg_runtime) {
wlr_log(L_ERROR, "XDG_RUNTIME_DIR is not set");
_exit(EXIT_FAILURE);
@@ -113,6 +114,7 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
_exit(EXIT_FAILURE);
}
setenv("XDG_RUNTIME_DIR", xdg_runtime, true);
+ setenv("PATH", path_var, true);
char wayland_socket_str[16];
snprintf(wayland_socket_str, sizeof(wayland_socket_str), "%d", wlr_xwayland->wl_fd[1]);
setenv("WAYLAND_SOCKET", wayland_socket_str, true);