@@ -1,8 +1,7 @@
11#!/bin/sh
22# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
33#
4−# Copyright (C) 2011,2013 Canonical Ltd
5−# Author: Michael Terry <michael.terry@canonical.com>
4+# Copyright (C) 2011,2013,2016 Canonical Ltd
65#
76# This program is free software: you can redistribute it and/or modify it under
87# the terms of the GNU General Public License as published by the Free Software
@@ -42,6 +41,8 @@ set_greeter_var()
4241SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
4342rm -f $SUB_SOCKET # clear socket in case we were hard shut down
4443
44+rm -f "$XDG_RUNTIME_DIR/dbus-session"
45+
4546# If touch session script (which sets up grid units and mir variables) is available, use it
4647TOUCH_WRAPPER=
4748if [ -x /usr/bin/ubuntu-touch-session ]; then
@@ -68,6 +69,7 @@ while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0
6869export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
6970
7071# Connect upstart to system.
72+echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/dbus-session"
7173/sbin/initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"
7274/sbin/initctl start notify-cgmanager
7375