@@ -20,8 +20,8 @@ cleanup()
21 trap - TERM EXIT
21 trap - TERM EXIT
22 # Kill upstart and indicators
22 # Kill upstart and indicators
23− if [ -n "$INIT_PID" ]; then
23+ if [ -n "$IND_PID" ]; then
24− kill "$INIT_PID"
24+ kill "$IND_PID"
26 if [ -n "$CMD_PID" ]; then
26 if [ -n "$CMD_PID" ]; then
27 kill "$CMD_PID"
27 kill "$CMD_PID"
@@ -32,10 +32,7 @@ cleanup()
32set_greeter_var()
32set_greeter_var()
34 export "$1=$2"
34 export "$1=$2"
35− gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
35+ dbus-update-activation-environment --systemd "$1=$2"
36− if [ -n "$INIT_PID" ]; then
37− initctl set-env --global "$1=$2"
41SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
38SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
@@ -61,25 +58,12 @@ set_greeter_var QT_QPA_PLATFORM ubuntumirclient
61# eventually need the greeter to play ringtones for users that aren't logged in.
58# eventually need the greeter to play ringtones for users that aren't logged in.
62set_greeter_var PA_DISABLED 1
59set_greeter_var PA_DISABLED 1
64−# Normal unity8 sessions are entirely driven by Upstart. But greeters
61+# Start the indicators
65−# are special. They need access to the file descriptors that lightdm
62+/usr/lib/gnome-session/run-systemd-session indicators.target &
66−# creates for them and don't want to start all the services that a normal
63+IND_PID=$!
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 &
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
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
81# Start any pre-greeter tasks if needed (like wizard)
65# Start any pre-greeter tasks if needed (like wizard)
82−initctl emit unity8-greeter-starting
66+#initctl emit unity8-greeter-starting FIXME
84# Define language here for phone if available. When phone user switches their
68# Define language here for phone if available. When phone user switches their
85# language, they expect that to affect the greeter too. But the user doesn't
69# language, they expect that to affect the greeter too. But the user doesn't