on xenial help sign in
Save dbus-session in /run/ again, in attempt to make dialer-app launching more reliable
8df7740Michael Terry
data/unity8-greeter-wrapper+4−2
@@ -1,8 +1,7 @@
1#!/bin/sh
1#!/bin/sh
2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
3#
3#
4−# Copyright (C) 2011,2013 Canonical Ltd
4+# Copyright (C) 2011,2013,2016 Canonical Ltd
5−# Author: Michael Terry <michael.terry@canonical.com>
6#
5#
7# This program is free software: you can redistribute it and/or modify it under
6# This program is free software: you can redistribute it and/or modify it under
8# the terms of the GNU General Public License as published by the Free Software
7# the terms of the GNU General Public License as published by the Free Software
@@ -42,6 +41,8 @@ set_greeter_var()
42SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
41SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
43rm -f $SUB_SOCKET # clear socket in case we were hard shut down
42rm -f $SUB_SOCKET # clear socket in case we were hard shut down
44
43
44+rm -f "$XDG_RUNTIME_DIR/dbus-session"
45+
45# If touch session script (which sets up grid units and mir variables) is available, use it
46# If touch session script (which sets up grid units and mir variables) is available, use it
46TOUCH_WRAPPER=
47TOUCH_WRAPPER=
47if [ -x /usr/bin/ubuntu-touch-session ]; then
48if [ -x /usr/bin/ubuntu-touch-session ]; then
@@ -68,6 +69,7 @@ while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0
68export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
69export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
69
70
70# Connect upstart to system.
71# Connect upstart to system.
72+echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/dbus-session"
71/sbin/initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"
73/sbin/initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"
72/sbin/initctl start notify-cgmanager
74/sbin/initctl start notify-cgmanager
73
75