diff options
Diffstat (limited to 'meta/recipes-graphics/wayland/weston-init')
-rw-r--r-- | meta/recipes-graphics/wayland/weston-init/init | 2 | ||||
-rwxr-xr-x | meta/recipes-graphics/wayland/weston-init/weston-start | 37 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston-init/weston.service | 4 |
3 files changed, 14 insertions, 29 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init index a849f29bcb..d3b0d1873e 100644 --- a/meta/recipes-graphics/wayland/weston-init/init +++ b/meta/recipes-graphics/wayland/weston-init/init @@ -32,7 +32,7 @@ case "$1" in . /etc/profile export HOME=ROOTHOME - weston-start -- $OPTARGS + WESTON_USER=weston weston-start $OPTARGS & ;; stop) diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start index 0b93dc964a..01670cd4f5 100755 --- a/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/meta/recipes-graphics/wayland/weston-init/weston-start @@ -6,7 +6,7 @@ export PATH="/sbin:/usr/sbin:/bin:/usr/bin" usage() { cat <<EOF - $0 [<openvt arguments>] [-- <weston options>] + $0 [<weston options>] EOF } @@ -18,9 +18,12 @@ add_weston_argument() { weston_args="$weston_args $1" } -# Add openvt extra argument -add_openvt_argument() { - openvt_args="$openvt_args $1" +## Add module to --modules argument +add_weston_module() { + if [[ "x${weston_modules}" == "x" ]]; then + weston_modules="--modules " + fi; + weston_modules+="${1}," } if [ -n "$WAYLAND_DISPLAY" ]; then @@ -29,33 +32,12 @@ if [ -n "$WAYLAND_DISPLAY" ]; then fi if [ -n "$WESTON_USER" ]; then - if [ -z "$WESTON_TTY" ]; then - echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY." - exit 1 - fi if [ -z "$WESTON_GROUP" ]; then # no explicit WESTON_GROUP given, therefore use WESTON_USER export WESTON_GROUP="${WESTON_USER}" fi - weston_args_user="-u $WESTON_USER -t $WESTON_TTY" -fi - -if [ -n "$DISPLAY" ]; then - launcher="weston" -else - launcher="weston-launch $weston_args_user --" fi -openvt_args="-s" -while [ -n "$1" ]; do - if [ "$1" = "--" ]; then - shift - break - fi - openvt_args="$openvt_args $1" - shift -done - weston_args=$* # Load and run modules @@ -68,6 +50,9 @@ if [ -d "$modules_dir" ]; then # process module . $m + if [[ x"{$weston_modules}" != "x" ]]; then + add_weston_argument "${weston_modules}" + fi; done fi @@ -83,4 +68,4 @@ if test -z "$XDG_RUNTIME_DIR"; then fi fi -exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log +su -c "XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` weston $weston_args --log=/tmp/weston.log" $WESTON_USER diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service index e09625b31c..80745998ed 100644 --- a/meta/recipes-graphics/wayland/weston-init/weston.service +++ b/meta/recipes-graphics/wayland/weston-init/weston.service @@ -37,8 +37,8 @@ EnvironmentFile=/etc/default/weston ExecStart=/usr/bin/weston --modules=systemd-notify.so # Optional watchdog setup -TimeoutStartSec=60 -WatchdogSec=20 +#TimeoutStartSec=60 +#WatchdogSec=20 # The user to run Weston as. User=weston |