mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
21 lines
436 B
Bash
Executable File
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
|