add [xwayland] path weston.ini option
It sets the path to the xserver to run. Signed-off-by: Maksim Melnikau <maxposedon@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
06b16c2a0b
commit
92de144331
@@ -77,6 +77,7 @@ The section headers are:
|
|||||||
.BR "input-method " "Onscreen keyboard input"
|
.BR "input-method " "Onscreen keyboard input"
|
||||||
.BR "keyboard " "Keyboard layouts"
|
.BR "keyboard " "Keyboard layouts"
|
||||||
.BR "terminal " "Terminal application options"
|
.BR "terminal " "Terminal application options"
|
||||||
|
.BR "xwayland " "XWayland options"
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
@@ -357,6 +358,12 @@ sets the size of the terminal font (unsigned integer).
|
|||||||
The terminal shell (string). Sets the $TERM variable.
|
The terminal shell (string). Sets the $TERM variable.
|
||||||
.RE
|
.RE
|
||||||
.RE
|
.RE
|
||||||
|
.SH "XWAYLAND SECTION"
|
||||||
|
.TP 7
|
||||||
|
.BI "path=" "/usr/bin/Xorg"
|
||||||
|
sets the path to the xserver to run (string).
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR weston (1),
|
.BR weston (1),
|
||||||
.BR weston-launch (1),
|
.BR weston-launch (1),
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
|
|||||||
struct weston_xserver *wxs = data;
|
struct weston_xserver *wxs = data;
|
||||||
char display[8], s[8];
|
char display[8], s[8];
|
||||||
int sv[2], client_fd;
|
int sv[2], client_fd;
|
||||||
|
char *xserver = NULL;
|
||||||
|
struct weston_config_section *section;
|
||||||
|
|
||||||
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv) < 0) {
|
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv) < 0) {
|
||||||
weston_log("socketpair failed\n");
|
weston_log("socketpair failed\n");
|
||||||
@@ -62,8 +64,11 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
|
|||||||
|
|
||||||
snprintf(display, sizeof display, ":%d", wxs->display);
|
snprintf(display, sizeof display, ":%d", wxs->display);
|
||||||
|
|
||||||
if (execl(XSERVER_PATH,
|
section = weston_config_get_section(wxs->compositor->config, "xwayland", NULL, NULL);
|
||||||
XSERVER_PATH,
|
weston_config_section_get_string(section, "path", &xserver, XSERVER_PATH);
|
||||||
|
|
||||||
|
if (execl(xserver,
|
||||||
|
xserver,
|
||||||
display,
|
display,
|
||||||
"-wayland",
|
"-wayland",
|
||||||
"-rootless",
|
"-rootless",
|
||||||
@@ -72,6 +77,7 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
|
|||||||
"-terminate",
|
"-terminate",
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
weston_log("exec failed: %m\n");
|
weston_log("exec failed: %m\n");
|
||||||
|
free(xserver);
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user