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.

commit8b3444a411db0978357658cdfc335e1eae63566d authorMarco Trevisan (Treviño) <mail@3v1n0.net> dateThu 9 Jun 2016, 14:07 (10 years ago) parent7fdbae9
1 file changed+13
data/unity8.conf+13
data/unity8.conf+13
@@ -55,6 +55,19 @@ end script
5555exec ${BINARY:-unity8} $ARGS
5656
5757post-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+
5871 initctl emit --no-wait indicator-services-start
5972end script
6073