on xenial help sign in
Save MIR_SOCKET for later use
5a1ee88Michael Terry
data/unity8.conf+12−3
@@ -8,12 +8,21 @@ respawn
8
8
9pre-start script
9pre-start script
10 if [ -n "$MIR_SOCKET" ]; then
10 if [ -n "$MIR_SOCKET" ]; then
11+ if [ -z "$UNITY_MIR_SOCKET" ]; then
12+ # Save original value of MIR_SOCKET in case we are restarted,
13+ # as we modify the variable for future jobs, including ourself.
14+ UNITY_MIR_SOCKET=$MIR_SOCKET
15+ initctl set-env --global UNITY_MIR_SOCKET=$UNITY_MIR_SOCKET
16+ fi
17+
11 # Point unity8 at unity-system-compositor
18 # Point unity8 at unity-system-compositor
12− initctl set-env MIR_SERVER_HOST_SOCKET=$MIR_SOCKET
13− initctl set-env MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
19+ MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
20+ initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
21+ initctl set-env MIR_SERVER_HOST_SOCKET=$UNITY_MIR_SOCKET
22+
14 # Point all future jobs in this session to our Mir socket instead of
23 # Point all future jobs in this session to our Mir socket instead of
15 # unity-system-compositor's socket.
24 # unity-system-compositor's socket.
16− initctl set-env --global MIR_SOCKET=$XDG_RUNTIME_DIR/mir_socket
25+ initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
17 fi
26 fi
18end script
27end script
19
28