[PATCH] compositor: Setup weston-launch sock in fbdev
Adrian Negreanu
groleo at gmail.com
Sun Jul 28 08:27:23 PDT 2013
weston_launcher_open() was failing with:
recvmsg: Socket operation on non-socket
Signed-off-by: Adrian Negreanu <adrian.m.negreanu at intel.com>
---
src/compositor-fbdev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index 9c3d17e..d2d8fe8 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -833,6 +833,15 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
config) < 0)
goto out_free;
+ /* Check if we run fbdev-backend using weston-launch */
+ compositor->base.launcher_sock =
+ weston_environment_get_fd("WESTON_LAUNCHER_SOCK");
+ if (compositor->base.launcher_sock == -1 && geteuid() != 0) {
+ weston_log("fatal: fbdev backend should be run "
+ "using weston-launch binary or as root\n");
+ goto out_compositor;
+ }
+
compositor->udev = udev_new();
if (compositor->udev == NULL) {
weston_log("Failed to initialize udev context.\n");
--
1.7.9.5
More information about the wayland-devel
mailing list