on xenial help sign in
Only use ubuntu-touch-session if available
cc17e13Michael Terry
data/unity8-greeter-wrapper+8−2
@@ -44,14 +44,20 @@ fi
44SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
44SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
45rm -f $SUB_SOCKET # clear socket in case we were hard shut down
45rm -f $SUB_SOCKET # clear socket in case we were hard shut down
46
46
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+
47# Normal unity8 sessions are entirely driven by Upstart. But greeters
53# Normal unity8 sessions are entirely driven by Upstart. But greeters
48# are special. They need access to the file descriptors that lightdm
54# are special. They need access to the file descriptors that lightdm
49# creates for them and don't want to start all the services that a normal
55# creates for them and don't want to start all the services that a normal
50# session would. So it's inconvenient to live within an upstart session.
56# session would. So it's inconvenient to live within an upstart session.
51# But... we still want to use Upstart for some services. So launch here.
57# 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 &
53
59
54−exec $@ --file=$SUB_SOCKET &
60+exec $TOUCH_WRAPPER $@ --file=$SUB_SOCKET &
55CMD_PID=$!
61CMD_PID=$!
56wait $CMD_PID
62wait $CMD_PID
57CMD_PID=
63CMD_PID=
data/unity8-greeter.desktop.in+1−1
@@ -1,5 +1,5 @@
1[Desktop Entry]
1[Desktop Entry]
2Type=Application
2Type=Application
3Name=Unity 8 Greeter
3Name=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
5X-LightDM-Session-Type=mir
5X-LightDM-Session-Type=mir