on xenial help sign in
Lazily start indicators, and only once unity8 is ready to receive them
commitf4ede851deec8a92f30fdf9fb081272ebda94675 authorMichael Terry <michael.terry@canonical.com> dateWed 26 Mar 2014, 16:34 (13 years ago) parent7dc7c29
4 files changed+10−8
data/CMakeLists.txt+5−2 plugins/LightDM/unity8-greeter-init.conf → data/unity8-greeter-init.conf−1 data/unity8-greeter-wrapper+5−1 plugins/LightDM/CMakeLists.txt−4
data/CMakeLists.txt+5−2
@@ -10,9 +10,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop ${CMAKE_CURRENT_B
1010install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop
1111 DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/greeters
1212 )
13−install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/51-${GREETER_APP}.conf
13+install(FILES 51-${GREETER_APP}.conf
1414 DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/lightdm.conf.d
1515 )
16−install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${GREETER_APP}-wrapper
16+install(FILES ${GREETER_APP}-wrapper
1717 DESTINATION ${CMAKE_INSTALL_BINDIR}
1818 )
19+install(FILES unity8-greeter-init.conf
20+ DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
21+ )
plugins/LightDM/unity8-greeter-init.conf → data/unity8-greeter-init.confrenamed−1
@@ -6,7 +6,6 @@ emits indicator-services-start
66task
77
88script
9− initctl emit --no-wait indicator-services-start
109 initctl start --no-wait ofono-setup || true
1110 initctl start --no-wait maliit-server || true
1211end script
data/unity8-greeter-wrapper+5−1
@@ -56,8 +56,12 @@ fi
5656# session would. So it's inconvenient to live within an upstart session.
5757# But... we still want to use Upstart for some services. So launch here.
5858MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER /sbin/init --user --startup-event=unity8-greeter-started &
59+INIT_PID=$!
60+while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
61+export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
5962
60−exec $TOUCH_WRAPPER $@ --file=$SUB_SOCKET &
63+export MIR_SERVER_FILE=$SUB_SOCKET
64+exec $TOUCH_WRAPPER $@ &
6165CMD_PID=$!
6266wait $CMD_PID
6367CMD_PID=
plugins/LightDM/CMakeLists.txt−4
@@ -37,7 +37,3 @@ qt5_use_modules(LightDM-qml DBus Qml)
3737# export the qmldir qmltypes and plugin files
3838export_qmlfiles(LightDM LightDM)
3939export_qmlplugin(LightDM 0.1 LightDM TARGETS LightDM-qml)
40−
41−install(FILES unity8-greeter-init.conf
42− DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
43− )