File entrypoint.sh of Package weston
#!/bin/bash
export XDG_SESSION_TYPE=wayland
export LIBSEAT_BACKEND=seatd
# Ensure XDG_RUNTIME_DIR env is set
if [[ -z "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR="/run/user/0"
fi
# Ensure xdg runtime exists
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR"
fi
# Make sure a wayland display is explicitly set
WAYLAND_SOCKET_NAME="$WAYLAND_DISPLAY"
unset WAYLAND_DISPLAY
if [[ -z "$WAYLAND_SOCKET_NAME" ]]; then
WAYLAND_SOCKET_NAME="wayland-0"
fi
seatd 2&> /root/seatd.log &
dbus-run-session -- /usr/bin/weston --shell=kiosk-shell.so --socket="$WAYLAND_SOCKET_NAME" --log=/root/weston.log