@@ -20,8 +20,8 @@ cleanup()
2020{
2121 trap - TERM EXIT
2222 # Kill upstart and indicators
23− if [ -n "$INIT_PID" ]; then
24− kill "$INIT_PID"
23+ if [ -n "$IND_PID" ]; then
24+ kill "$IND_PID"
2525 fi
2626 if [ -n "$CMD_PID" ]; then
2727 kill "$CMD_PID"
@@ -32,10 +32,7 @@ cleanup()
3232set_greeter_var()
3333{
3434 export "$1=$2"
35− gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
36− if [ -n "$INIT_PID" ]; then
37− initctl set-env --global "$1=$2"
38− fi
35+ dbus-update-activation-environment --systemd "$1=$2"
3936}
4037
4138SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
@@ -61,25 +58,12 @@ set_greeter_var QT_QPA_PLATFORM ubuntumirclient
6158# eventually need the greeter to play ringtones for users that aren't logged in.
6259set_greeter_var PA_DISABLED 1
6360
64−# Normal unity8 sessions are entirely driven by Upstart. But greeters
65−# are special. They need access to the file descriptors that lightdm
66−# creates for them and don't want to start all the services that a normal
67−# session would. So it's inconvenient to live within an upstart session.
68−# But... we still want to use Upstart for some services. So launch here.
69−MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER upstart --user --no-startup-event &
70−INIT_PID=$!
71−while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
72−. "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session"
73−export UPSTART_SESSION
74−
75−# Connect upstart to system, but do first command in a loop to avoid any
76−# race condition between the session file above being written and upstart being
77−# ready to handle requests.
78−while ! initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
79−initctl start notify-cgmanager
61+# Start the indicators
62+/usr/lib/gnome-session/run-systemd-session indicators.target &
63+IND_PID=$!
8064
8165# Start any pre-greeter tasks if needed (like wizard)
82−initctl emit unity8-greeter-starting
66+#initctl emit unity8-greeter-starting FIXME
8367
8468# Define language here for phone if available. When phone user switches their
8569# language, they expect that to affect the greeter too. But the user doesn't