on xenial help sign in
Stop showing a lockscreen on startup on the desktop
commit7dc67cc530d29ebef6c74469e429e8e92590364b authorMichael Terry <michael.terry@canonical.com> dateThu 9 Jun 2016, 10:38 (10 years ago) parent7fdbae9
3 files changed+17−5
data/unity8.conf+11−1 qml/Greeter/Greeter.qml+5−3 qml/Shell.qml+1−1
data/unity8.conf+11−1
@@ -50,9 +50,19 @@ pre-start script
5050 # the lag seen in the indicator panel pull-down (LP: #1488327) and also
5151 # reduces lag seen in apps:
5252 initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
53+
54+ if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
55+ # On Ubuntu Touch, we currently use a trick where we auto-login the
56+ # user without a LightDM greeter at all. In this case, we want to
57+ # start with the lockscreen visible. Once we switch to using a
58+ # proper greeter for the first login, we can remove this code path.
59+ initctl set-env MODE=full-greeter
60+ else
61+ initctl set-env MODE=full-shell
62+ fi
5363end script
5464
55−exec ${BINARY:-unity8} $ARGS
65+exec ${BINARY:-unity8} --mode=$MODE $ARGS
5666
5767post-start script
5868 initctl emit --no-wait indicator-services-start
qml/Greeter/Greeter.qml+5−3
@@ -163,11 +163,13 @@ Showable {
163163 }
164164 }
165165
166− function checkForcedUnlock() {
166+ function checkForcedUnlock(hideNow) {
167167 if (forcedUnlock && shown && loader.item) {
168168 // pretend we were just authenticated
169169 loader.item.notifyAuthenticationSucceeded();
170170 loader.item.hide();
171+ if (hideNow)
172+ root.hideNow(); // skip hide animation
171173 }
172174 }
173175 }
@@ -178,8 +180,8 @@ Showable {
178180 }
179181 }
180182
181− onForcedUnlockChanged: d.checkForcedUnlock()
182− Component.onCompleted: d.checkForcedUnlock()
183+ onForcedUnlockChanged: d.checkForcedUnlock(false /* hideNow */)
184+ Component.onCompleted: d.checkForcedUnlock(true /* hideNow */)
183185
184186 onRequiredChanged: {
185187 if (required) {
qml/Shell.qml+1−1
@@ -419,7 +419,7 @@ StyledItem {
419419 hides: [launcher, panel.indicators]
420420 tabletMode: shell.usageScenario != "phone"
421421 launcherOffset: launcher.progress
422− forcedUnlock: wizard.active
422+ forcedUnlock: wizard.active || shell.mode === "full-shell"
423423 background: wallpaperResolver.background
424424
425425 // avoid overlapping with Launcher's edge drag area