Use weston-init to startup weston
[AGL/meta-agl.git] / meta-agl / recipes-graphics / wayland / weston-init.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3 WESTONTTY ??= "1"
4 WESTONUSER ??= "root"
5 WESTONARGS ?= "--idle-time=4294967"
6 WESTONLAUNCHARGS ??= "--tty /dev/tty${WESTONTTY} --user ${WESTONUSER}"
7
8 do_install_append() {
9     sed -e 's,launcher="weston-launch.*--",launcher="weston-launch ${WESTONLAUNCHARGS} --",g' \
10         -e 's,exec openvt $openvt_args --,exec ,g' \
11         -i ${D}${bindir}/weston-start
12
13     sed -e 's,User=root,User=${WESTONUSER},g' \
14         -e 's,$OPTARGS,${WESTONARGS} $OPTARGS,g' \
15         -i ${D}${systemd_system_unitdir}/weston.service
16
17     sed -i "/\[Unit\]/aConflicts=getty@tty${WESTONTTY}.service" \
18            ${D}${systemd_system_unitdir}/weston.service
19 }
20