on 8.15+17.04.20170404.7-0ubuntu1 help sign in
unity8/data/unity8.conf
82 lines 3.0 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) or (xsession SESSION=unity8)) and started dbus
7stop on desktop-end
9kill timeout 120
12# Ensure the shell always gets unthrottled touch events, so that applications
13# who want full speed low-latency input can get it (LP: #1497105) and so that
14# apps can use QML touch compression safely (the QML touch compression
15# algorithm does not support nesting well - LP: #1486341, LP: #1556763 - so
16# must be fed by the raw input event stream from Unity8).
18env QML_NO_TOUCH_COMPRESSION=1
20respawn
21expect stop
23# FIXME Create an autopilot test that makes sure start+stop and restart
24# work fine at least 2 times
26pre-start script
27 # Tell unity-mir to raise SIGSTOP after we start
28 initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
30 # Save original value of MIR_SOCKET so that we can restore it when stopped,
31 # as we modify the variable for future jobs, including ourself.
32 initctl set-env UNITY_MIR_SOCKET=$MIR_SOCKET
34 # Decide where we are going to put our own socket file
35 if [ -n "$SNAP" ]; then
36 # In snappy, we want to hard code our path because our apparmor profile
37 # only lets us put the socket in one place. And consumers expect it
38 # there.
39 MIR_SERVER_FILE=/run/user/$(id -u)/mir_socket
40 else
41 MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
42 fi
43 initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
45 # Point all future jobs in this session to our Mir socket instead of
46 # unity-system-compositor's socket.
47 initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
48 gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
50 # Remove the normal and trusted sockets if still there
51 if [ -S "$MIR_SERVER_FILE" ]; then
52 rm "$MIR_SERVER_FILE"
53 fi
55 if [ -S "${MIR_SERVER_FILE}_trusted" ]; then
56 rm "${MIR_SERVER_FILE}_trusted"
57 fi
59 initctl set-env --global MIR_SERVER_PROMPT_FILE=1
61 if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
62 # On Ubuntu Touch, we currently use a trick where we auto-login the
63 # user without a LightDM greeter at all. In this case, we want to
64 # start with the lockscreen visible. Once we switch to using a
65 # proper greeter for the first login, we can remove this code path.
66 initctl set-env MODE=full-greeter
67 else
68 initctl set-env MODE=full-shell
69 fi
70end script
72exec ${BINARY:-unity8} --mode=$MODE $ARGS
74post-start script
75 initctl emit --no-wait indicator-services-start
76end script
78post-stop script
79 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
80 initctl unset-env --global MIR_SERVER_PROMPT_FILE
81 initctl emit application-end
82end script