on xenial help sign in
Only set variables if in nested mode
commit8a91f142fe4197298c05c4d99aad3b752b2a9475 authorMichael Terry <michael.terry@canonical.com> dateWed 13 Nov 2013, 23:25 (13 years ago) parent8c54292
1 file changed+9−6
data/unity8.conf+9−6
data/unity8.conf+9−6
@@ -7,11 +7,14 @@ stop on desktop-end
77respawn
88
99pre-start script
10− # Point unity8 at unity-system-compositor
11− initctl set-env MIR_SERVER_HOST_SOCKET=$MIR_SOCKET
12− # Point all future jobs in this session to our Mir socket instead of
13− # unity-system-compositor's socket.
14− initctl set-env --global MIR_SOCKET=$XDG_RUNTIME_DIR/mir_socket
10+ if [ -n "$MIR_SOCKET" ]; then
11+ # 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
14+ # Point all future jobs in this session to our Mir socket instead of
15+ # unity-system-compositor's socket.
16+ initctl set-env --global MIR_SOCKET=$XDG_RUNTIME_DIR/mir_socket
17+ fi
1518end script
1619
17−exec ${BINARY:-unity8} --file=$MIR_SOCKET $ARGS
20+exec ${BINARY:-unity8} $ARGS