on xenial help sign in
Only use ubuntu-touch-session if available
commitcc17e13330178d063215864a57e36cfe0b89587f authorMichael Terry <michael.terry@canonical.com> dateTue 25 Mar 2014, 15:31 (13 years ago) parentf549c4c
2 files changed+9−3
data/unity8-greeter-wrapper+8−2 data/unity8-greeter.desktop.in+1−1
data/unity8-greeter-wrapper+8−2
@@ -44,14 +44,20 @@ fi
4444SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
4545rm -f $SUB_SOCKET # clear socket in case we were hard shut down
4646
47+# If touch session script (which sets up grid units and mir variables) is available, use it
48+TOUCH_WRAPPER=
49+if [ -x /usr/bin/ubuntu-touch-session ]; then
50+ TOUCH_WRAPPER=/usr/bin/ubuntu-touch-session
51+fi
52+
4753# Normal unity8 sessions are entirely driven by Upstart. But greeters
4854# are special. They need access to the file descriptors that lightdm
4955# creates for them and don't want to start all the services that a normal
5056# session would. So it's inconvenient to live within an upstart session.
5157# But... we still want to use Upstart for some services. So launch here.
52−MIR_SOCKET=$SUB_SOCKET /sbin/init --user --startup-event=unity8-greeter-started &
58+MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER /sbin/init --user --startup-event=unity8-greeter-started &
5359
54−exec $@ --file=$SUB_SOCKET &
60+exec $TOUCH_WRAPPER $@ --file=$SUB_SOCKET &
5561CMD_PID=$!
5662wait $CMD_PID
5763CMD_PID=
data/unity8-greeter.desktop.in+1−1
@@ -1,5 +1,5 @@
11[Desktop Entry]
22Type=Application
33Name=Unity 8 Greeter
4−Exec=ubuntu-touch-session @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter-wrapper @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter
4+Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter-wrapper @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter
55X-LightDM-Session-Type=mir