diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init/profile b/meta-digi-dey/recipes-graphics/wayland/weston-init/profile index 078599f42..6183a7d55 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init/profile +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init/profile @@ -1,9 +1,15 @@ #!/bin/sh -# Set XDG_RUNTIME_DIR manually. -# The variable is not set for ssh login, causing app failures. It's not clear -# if this is an error or by design, but setting it manually does help and -# doesn't seem to hurt... +# Digi: use old version of the script to ensure weston starts correctly on +# sysvinit if test -z "$XDG_RUNTIME_DIR"; then - export XDG_RUNTIME_DIR=/run/user/`id -u` + export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` + if ! test -d "$XDG_RUNTIME_DIR"; then + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR + fi + if [ -n "$WESTON_USER" ] + then + chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR + fi fi