on xenial help sign in
Unity8.conf: ensure MIR_SOCKET is set for future customers (such as the dash)
8b3444aMarco Trevisan (Treviño)
data/unity8.conf+13
@@ -55,6 +55,19 @@ end script
55exec ${BINARY:-unity8} $ARGS
55exec ${BINARY:-unity8} $ARGS
56
56
57post-start script
57post-start script
58+ # If no MIR_SOCKET was defined on launch, we try to set one here
59+ if [ -z "$(initctl get-env --global UNITY_MIR_SOCKET)" ]; then
60+ if [ -S "$XDG_RUNTIME_DIR/mir_socket" ]; then
61+ mir_socket=$XDG_RUNTIME_DIR/mir_socket
62+ elif [ -S "/tmp/mir_socket" ]; then
63+ mir_socket=/tmp/mir_socket
64+ fi
65+
66+ if [ -n "$mir_socket" ]; then
67+ initctl set-env --global MIR_SOCKET="$mir_socket"
68+ fi
69+ fi
70+
58 initctl emit --no-wait indicator-services-start
71 initctl emit --no-wait indicator-services-start
59end script
72end script
60
73