on xenial help sign in
Move env setup past session init in greeter wrapper. Fixes: 1325882
commite04ee39cc8e9878bd71e1794415670a29a6277ce authorMichał Sawicz <michal.sawicz@canonical.com> dateTue 3 Jun 2014, 10:33 (12 years ago) parente0f5d226655fcf
1 file changed+10−5
data/unity8-greeter-wrapper+10−5
data/unity8-greeter-wrapper+10−5
@@ -32,6 +32,8 @@ cleanup()
3232
3333set_greeter_var()
3434{
35+ # Only use this after upstart has been started, otherwise multiple dbus
36+ # daemons are spawned.
3537 export "$1=$2"
3638 gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
3739 if [ -n "$INIT_PID" ]; then
@@ -52,11 +54,6 @@ fi
5254# will start.
5355export DESKTOP_SESSION=ubuntu-touch
5456
55−# We disable ofono using pulse. It causes problems with racing with the user's
56−# pulse. We need to come up with a better long-term fix for this, because we
57−# eventually need the greeter to play ringtones for users that aren't logged in.
58−set_greeter_var PA_DISABLED 1
59−
6057# Normal unity8 sessions are entirely driven by Upstart. But greeters
6158# are special. They need access to the file descriptors that lightdm
6259# creates for them and don't want to start all the services that a normal
@@ -67,6 +64,14 @@ INIT_PID=$!
6764while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
6865export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
6966
67+/sbin/initctl start dbus
68+export DBUS_SESSION_BUS_ADDRESS="$(/sbin/initctl get-env DBUS_SESSION_BUS_ADDRESS)"
69+
70+# We disable ofono using pulse. It causes problems with racing with the user's
71+# pulse. We need to come up with a better long-term fix for this, because we
72+# eventually need the greeter to play ringtones for users that aren't logged in.
73+set_greeter_var PA_DISABLED 1
74+
7075# Start any pre-greeter tasks if needed (like wizard)
7176/sbin/initctl emit unity8-greeter-starting
7277