]> code.ossystems Code Review - openembedded-core.git/commitdiff
weston-init: Use weston-launch when starting weston as the first windowing system
authorTom Hochstein <tom.hochstein@nxp.com>
Wed, 18 May 2016 16:40:47 +0000 (13:40 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 May 2016 21:21:30 +0000 (22:21 +0100)
When  weston is started as the first windowing system (i.e. not under X
nor under another Wayland server), it should be done with  the  command
weston-launch to set up proper privileged access to devices.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-graphics/wayland/weston-init/weston-start

index 4aa7c66d3bbbb3fd43ca75dbc9569688c14f314f..72ba4b70790ea22b49ee5c13afa873242963e524 100755 (executable)
@@ -31,6 +31,11 @@ if [ -n "$WAYLAND_DISPLAY" ]; then
        echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
        exit 1
 fi
+if [ -n "$DISPLAY" ]; then
+       launcher="weston"
+else
+       launcher="weston-launch --"
+fi
 
 openvt_args=""
 while [ -n "$1" ]; do
@@ -64,4 +69,4 @@ if test -z "$XDG_RUNTIME_DIR"; then
     chmod 0700 $XDG_RUNTIME_DIR
 fi
 
-exec openvt $openvt_args -- weston $weston_args --log=/var/log/weston.log
+exec openvt $openvt_args -- $launcher $weston_args --log=/var/log/weston.log