# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
+ # ************************************************************
+ # HACK TO WORK AROUND INSUFFICIENT ACCESS PERMISSIONS FOR
+ # UNPRIVILEGED USERS.
+ #
+ # Ideally we should launch weston with weston-launch with the
+ # appropriate --user flag. Unfortunately, weston-launch isn't
+ # available due to missing package dependencies.
+ # ************************************************************
+ chmod 777 $XDG_RUNTIME_DIR/wayland-0
+
# ***********************************************************
# HACK TO WORK AROUND BROKEN INFINITE LOOPS IN BOOT ANIMATION
# VIRTUAL KEYBOARD BOOT SCRIPTS.
export USER=root
fi
-XDG_RUNTIME_DIR=/run/user/$USER
+if [ -z "$XDG_RUNTIME_DIR"]; then
+ # User may not have sufficient privilege to make a directory in
+ # /run/user/$USER. Fall back on a subdirectory /tmp instead.
+ XDG_RUNTIME_DIR=/tmp/run-$USER
+fi
if [ ! -d "${XDG_RUNTIME_DIR}" ]; then
mkdir -p $XDG_RUNTIME_DIR
- chmod 700 $XDG_RUNTIME_DIR
+ # This really should be 700 but we currently have to run Weston as
+ # root.
+ chmod 777 $XDG_RUNTIME_DIR
fi
export XDG_RUNTIME_DIR