#!/bin/sh
#
# Start Wayland Weston compositor session on SliTaz GNU/Linux
#

export XDG_CONFIG_HOME="$HOME/.config"
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir

# Start DBUS session.
if [ ! "$DBUS_SESSION_BUS_ADDRESS" ]; then
	dbus-launch --sh-syntax --exit-with-session &
fi

if [ ! -d "${XDG_RUNTIME_DIR}" ]; then
	mkdir ${XDG_RUNTIME_DIR}
	chmod 0700 ${XDG_RUNTIME_DIR}
fi

exec weston-launch
