mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
xwayland: introduce WLR_XWAYLAND for specifying which Xwayland to use
When debugging Xwayland-related issues, a common first step in debugging has been to ask the reporter to move their real Xwayland to /usr/bin/Xwayland.bin, and create a shell script starting Xwayland with extra arguments under the original /usr/bin/Xwayland location. Introducing a `WLR_XWAYLAND` environment variable makes this less invasive, by allowing the user to swap out Xwayland without resorting to global system changes (or source patches).
This commit is contained in:
parent
feb0e1c74d
commit
1b0e4c7e6e
2 changed files with 11 additions and 1 deletions
|
|
@ -107,8 +107,16 @@ noreturn static void exec_xwayland(struct wlr_xwayland_server *server) {
|
|||
dup2(devnull, STDERR_FILENO);
|
||||
}
|
||||
|
||||
const char *xwayland_path = getenv("WLR_XWAYLAND");
|
||||
if (xwayland_path) {
|
||||
wlr_log(WLR_INFO, "Using Xwayland binary to '%s' due to WLR_XWAYLAND",
|
||||
xwayland_path);
|
||||
} else {
|
||||
xwayland_path = "Xwayland";
|
||||
}
|
||||
|
||||
// This returns if and only if the call fails
|
||||
execvp("Xwayland", argv);
|
||||
execvp(xwayland_path, argv);
|
||||
|
||||
wlr_log_errno(WLR_ERROR, "failed to exec Xwayland");
|
||||
close(devnull);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue