First, start a Mir server which talks to directly hardware (like unity-system-compositor):
sudo mir_demo_server -f /tmp/mir_socket --arw-file &
Now, unity8 needs a dbus server running, or else it will crash. Do this with:
dbus-daemon --session --print-address &
This will print a line like "unix:abstract=/tmp/dbus-bp6GTnVFyJ". You need to copy this into an env var like this:
export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bp6GTnVFyJ
Now can run unity8 immediately with:
DESKTOP_SESSION=unity8-mir \
MIR_SOCKET=$XDG_RUNTIME_DIR/mir_socket \
MIR_SERVER_PROMPT_FILE=1 \
MIR_SERVER_HOST_SOCKET=/tmp/mir_socket \
MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket \
MIR_SERVER_NAME=session-0 \
UNITY_INDICATOR_PROFILE=desktop \
QT_QPA_PLATFORM=mirserver /usr/bin/unity8