Files
poky/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
Joshua Watt ee905ad60b weston-init: Allow weston user to be specified
Adds variables to set the name of the weston user (defaulting to
"weston") and the home directory (defaulting to "/home/weston"). This
allows users to easily change which user the compositor runs as.

(From OE-Core rev: 079cf188adae1c7de3971a64df8cb04d5f47be4e)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-10-16 10:53:10 +01:00

21 lines
436 B
Bash
Executable File

#!/bin/sh
# set weston variables for use with global weston socket
global_socket="@runtimedir@/wayland-0"
if [ -e "$global_socket" ]; then
weston_group=$(stat -c "%G" "$global_socket")
if [ "$(id -u)" = "0" ]; then
export WAYLAND_DISPLAY="$global_socket"
else
case "$(groups "$USER")" in
*"$weston_group"*)
export WAYLAND_DISPLAY="$global_socket"
;;
*)
;;
esac
fi
unset weston_group
fi
unset global_socket