on 9aff648 help sign in
unity8/data/unity8.conf
66 lines 2.4 kB history raw
1description "Unity Shell v8"
2author "Ricardo Mendoza <ricmm@ubuntu.com>"
4emits indicator-services-start
6start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=unity8-mir)) and started dbus
7stop on desktop-end
9kill timeout 120
11respawn
12expect stop
14pre-start script
15 # Tell unity-mir to raise SIGSTOP after we start
16 initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
18 if [ -n "$MIR_SOCKET" ]; then
19 # FIXME Create an autopilot test that makes sure start+stop and restart
20 # work fine at least 2 times
21 # Save original value of MIR_SOCKET in case we are stopped,
22 # as we modify the variable for future jobs, including ourself.
23 UNITY_MIR_SOCKET=$(initctl get-env --global MIR_SOCKET)
24 initctl set-env --global UNITY_MIR_SOCKET=$UNITY_MIR_SOCKET
26 # Point unity8 at unity-system-compositor
27 MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
28 initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
29 initctl set-env MIR_SERVER_HOST_SOCKET=$UNITY_MIR_SOCKET
31 # Point all future jobs in this session to our Mir socket instead of
32 # unity-system-compositor's socket.
33 initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
34 gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
35 fi
37 # Remove the normal and trusted sockets if still there
38 if [ -S "$MIR_SERVER_FILE" ]; then
39 rm "$MIR_SERVER_FILE"
40 fi
42 if [ -S "${MIR_SERVER_FILE}_trusted" ]; then
43 rm "${MIR_SERVER_FILE}_trusted"
44 fi
46 initctl set-env --global MIR_SERVER_PROMPT_FILE=1
48 # Disable Qt's stuttering 'touch compression' to fix scrolling smoothness
49 # issues (LP: #1486341, LP: #1556763). As a bonus, this eliminates most of
50 # the lag seen in the indicator panel pull-down (LP: #1488327) and also
51 # reduces lag seen in apps:
52 initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
53end script
55exec ${BINARY:-unity8} $ARGS
57post-start script
58 initctl emit --no-wait indicator-services-start
59end script
61post-stop script
62 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
63 initctl unset-env --global UNITY_MIR_SOCKET
64 initctl unset-env --global MIR_SERVER_PROMPT_FILE
65 initctl emit application-end
66end script