on vivid help sign in
unity8/data/unity8.conf
89 lines 3.3 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
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
54 if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
55 # On Ubuntu Touch, we currently use a trick where we auto-login the
56 # user without a LightDM greeter at all. In this case, we want to
57 # start with the lockscreen visible. Once we switch to using a
58 # proper greeter for the first login, we can remove this code path.
59 initctl set-env MODE=full-greeter
60 else
61 initctl set-env MODE=full-shell
62 fi
63end script
65exec ${BINARY:-unity8} --mode=$MODE $ARGS
67post-start script
68 # If no MIR_SOCKET was defined on launch, we try to set one here
69 if [ -z "$(initctl get-env --global UNITY_MIR_SOCKET)" ]; then
70 if [ -S "$XDG_RUNTIME_DIR/mir_socket" ]; then
71 mir_socket=$XDG_RUNTIME_DIR/mir_socket
72 elif [ -S "/tmp/mir_socket" ]; then
73 mir_socket=/tmp/mir_socket
74 fi
76 if [ -n "$mir_socket" ]; then
77 initctl set-env --global MIR_SOCKET="$mir_socket"
78 fi
79 fi
81 initctl emit --no-wait indicator-services-start
82end script
84post-stop script
85 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
86 initctl unset-env --global UNITY_MIR_SOCKET
87 initctl unset-env --global MIR_SERVER_PROMPT_FILE
88 initctl emit application-end
89end script