@@ -45,8 +45,8 @@ echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/d
46# 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
47TOUCH_WRAPPER=
47TOUCH_WRAPPER=
48−if [ -x /usr/bin/ubuntu-touch-session ]; then
48+if which ubuntu-touch-session >/dev/null; then
49− TOUCH_WRAPPER=/usr/bin/ubuntu-touch-session
49+ TOUCH_WRAPPER=ubuntu-touch-session
52# Pretend that we're in an ubuntu-touch session, so that indicator-network
52# Pretend that we're in an ubuntu-touch session, so that indicator-network
@@ -63,7 +63,7 @@ set_greeter_var PA_DISABLED 1
63# creates for them and don't want to start all the services that a normal
63# creates for them and don't want to start all the services that a normal
64# session would. So it's inconvenient to live within an upstart session.
64# session would. So it's inconvenient to live within an upstart session.
65# But... we still want to use Upstart for some services. So launch here.
65# But... we still want to use Upstart for some services. So launch here.
66−MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER /sbin/upstart --user --no-startup-event &
66+MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER upstart --user --no-startup-event &
67INIT_PID=$!
67INIT_PID=$!
68while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
68while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
69. "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session"
69. "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session"
@@ -72,11 +72,11 @@ export UPSTART_SESSION
72# Connect upstart to system, but do first command in a loop to avoid any
72# Connect upstart to system, but do first command in a loop to avoid any
73# race condition between the session file above being written and upstart being
73# race condition between the session file above being written and upstart being
74# ready to handle requests.
74# ready to handle requests.
75−while ! /sbin/initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
75+while ! initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
76−/sbin/initctl start notify-cgmanager
76+initctl start notify-cgmanager
78# Start any pre-greeter tasks if needed (like wizard)
78# Start any pre-greeter tasks if needed (like wizard)
79−/sbin/initctl emit unity8-greeter-starting
79+initctl emit unity8-greeter-starting
81# Define language here for phone if available. When phone user switches their
81# Define language here for phone if available. When phone user switches their
82# language, they expect that to affect the greeter too. But the user doesn't
82# language, they expect that to affect the greeter too. But the user doesn't