# 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.
+ # ************************************************************
+ wayland_socket="$XDG_RUNTIME_DIR/wayland-0"
+ MAX_ATTEMPTS=8
+ attempt=0
+ while [ ! -f $wayland_socket ] && [ $attempt -lt $MAX_ATTEMPTS ]
+ do
+ sleep 0.5
+ attempt=$[$attempt + 1]
+ done
+ chmod 777 $wayland_socket
+
# ***********************************************************
# HACK TO WORK AROUND BROKEN INFINITE LOOPS IN BOOT ANIMATION
# VIRTUAL KEYBOARD BOOT SCRIPTS.