@@ -45,8 +45,8 @@ echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/d
4545
4646# If touch session script (which sets up grid units and mir variables) is available, use it
4747TOUCH_WRAPPER=
48−if [ -x /usr/bin/ubuntu-touch-session ]; then
49− TOUCH_WRAPPER=/usr/bin/ubuntu-touch-session
48+if which ubuntu-touch-session >/dev/null; then
49+ TOUCH_WRAPPER=ubuntu-touch-session
5050fi
5151
5252# Pretend that we're in an ubuntu-touch session, so that indicator-network
@@ -63,7 +63,7 @@ set_greeter_var PA_DISABLED 1
6363# creates for them and don't want to start all the services that a normal
6464# session would. So it's inconvenient to live within an upstart session.
6565# 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 &
6767INIT_PID=$!
6868while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
6969. "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session"
@@ -72,11 +72,11 @@ export UPSTART_SESSION
7272# Connect upstart to system, but do first command in a loop to avoid any
7373# race condition between the session file above being written and upstart being
7474# ready to handle requests.
75−while ! /sbin/initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
76−/sbin/initctl start notify-cgmanager
75+while ! initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
76+initctl start notify-cgmanager
7777
7878# Start any pre-greeter tasks if needed (like wizard)
79−/sbin/initctl emit unity8-greeter-starting
79+initctl emit unity8-greeter-starting
8080
8181# Define language here for phone if available. When phone user switches their
8282# language, they expect that to affect the greeter too. But the user doesn't