on xenial help sign in
Use upstart in ./run

Makes it so that you can use the lock button on the device without getting that nasty hwc crash

commit0a8cb52d2b8870b3a9759d91481281e12fcb2854 authorAlbert Astals <albert.astals@canonical.com> dateWed 16 Apr 2014, 13:43 (13 years ago) parent3116599d6509f7
1 file changed+15−1
run+15−1
run+15−1
@@ -68,8 +68,22 @@ if $MOUSE_TOUCH; then
6868 QML_PHONE_SHELL_ARGS="$QML_PHONE_SHELL_ARGS -mousetouch"
6969fi
7070
71+control_c()
72+{
73+ /sbin/initctl stop unity8
74+ exit $?
75+}
76+
77+trap control_c INT
78+
7179if $GDB; then
7280 gdb -ex run --args $QML_PHONE_SHELL_PATH $QML_PHONE_SHELL_ARGS $@
7381else
74− $QML_PHONE_SHELL_PATH $QML_PHONE_SHELL_ARGS $@
82+ status=`/sbin/initctl status unity8`
83+ if [ "$status" != "unity8 stop/waiting" ]; then
84+ echo "Unity8 is already running, please stop it first"
85+ exit 1
86+ fi
87+ /sbin/initctl start unity8 BINARY="`readlink -f $QML_PHONE_SHELL_PATH` $QML_PHONE_SHELL_ARGS $@"
88+ tailf -n 0 ~/.cache/upstart/unity8.log
7589fi