1
description "Unity Shell v8 on Mir"
3
emits indicator-services-start
5
start on xsession SESSION=unity8-mir and started dbus
12
# Tell unity-mir to raise SIGSTOP after we start
13
initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
15
if [ -n "$MIR_SOCKET" ]; then
16
if [ -z "$UNITY_MIR_SOCKET" ]; then
17
# Save original value of MIR_SOCKET in case we are restarted,
18
# as we modify the variable for future jobs, including ourself.
19
UNITY_MIR_SOCKET=$MIR_SOCKET
20
initctl set-env --global UNITY_MIR_SOCKET=$UNITY_MIR_SOCKET
23
# Point unity8 at unity-system-compositor
24
MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
25
initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
26
initctl set-env MIR_SERVER_HOST_SOCKET=$UNITY_MIR_SOCKET
28
# Point all future jobs in this session to our Mir socket instead of
29
# unity-system-compositor's socket.
30
initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
32
gdbus call --session \
33
--dest org.freedesktop.DBus \
34
--object-path /org/freedesktop/DBus \
35
--method org.freedesktop.DBus.UpdateActivationEnvironment \
36
"@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
39
initctl emit --no-wait indicator-services-start
42
exec ${BINARY:-unity8} $ARGS
44
pre-stop exec initctl emit --no-wait desktop-end
45
post-stop exec dbus-send --type=method_call --address=$UPSTART_SESSION /com/ubuntu/Upstart com.ubuntu.Upstart0_6.EndSession