on xenial help sign in
Unity8.conf: ensure MIR_SOCKET is set for future customers (such as the dash)

This ensures that if we run unity8 as standalone in Mir on X/KMS the MIR_SOCKET is defined for other clients.

commit62094cabbb209d49e46319c6567880422149deba authorMarco Trevisan (Treviño) <mail@3v1n0.net> dateMon 27 Jun 2016, 18:42 (10 years ago) parentaafa4158b3444a
1 file changed+13
data/unity8.conf+13
data/unity8.conf+13
@@ -65,6 +65,19 @@ end script
6565exec ${BINARY:-unity8} --mode=$MODE $ARGS
6666
6767post-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
75+
76+ if [ -n "$mir_socket" ]; then
77+ initctl set-env --global MIR_SOCKET="$mir_socket"
78+ fi
79+ fi
80+
6881 initctl emit --no-wait indicator-services-start
6982end script
7083