mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
Add profile script to point users capable of interacting with the global socket to it by default. (From OE-Core rev: 2818cbc73093996f8ecb93a4f0df8a31fd4692d3) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
21 lines
428 B
Bash
Executable File
21 lines
428 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# set weston variables for use with global weston socket
|
|
global_socket="/run/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
|